Bueno como ando programando se me ocurrio programar un dia un codigo para obtener algo de otra pagina y vi las camaras tengo libre acceso a 2 camaras :3 y me dijo un compa deberias obtener las camaras y q tus usuarios pongan las favoritas en tu sitio y dije ok.. a programar aqui les comparto lso resultados :3 por si alguien quiere tener camaras web en sus sitios :3 solo falta refinar el codigo pero trabaja un 90% :3
Es necesario la libreria jquery que pueden descargar por ahi... solo busquen en google u.u
Primero creamos una carpeta cam4 y agregamos:
index.php
cam4.php
Y no Olvides Agregarte a mi red social :3 no lo olvidez pronto programare algo u.u.... mientras unete no?? :3
ACTUALIZACION :3 PUEDEN VEN EL RESULTADO EN http://laticatx.byethost10.com/cam4/
Y PARA LOS QUE NO LES CORRE
NUEVO CURL
Es necesario la libreria jquery que pueden descargar por ahi... solo busquen en google u.u
Primero creamos una carpeta cam4 y agregamos:
index.php
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Visita Las Camaras Porno de ZorroX. K - braZ. CoM</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
//Carga Inicial
function loadstart(){ $.ajax({ type: 'get', url: 'cam4.php', success: function(html) {
contenido = $(html).find('#main-content'), tabla = $('div');
if($(html).find('#main-content')){ $("#models").html(contenido);
//PUSHSTATE
$('nav a').click(function(e){ myurl = $(this).attr("href"); href = myurl.replace(/^\//, "");loadContent(href); history.pushState( href,href, href); e.preventDefault();});
// THIS EVENT MAKES SURE THAT THE BACK/FORWARD BUTTONS WORK AS WELL
window.onpopstate = function(event) {console.log("pathname: "+location.pathname); loadContent(location);};
//LOAD
function loadContent(url){ $.ajax({type: 'post',url: 'cam4.php?id='+url,success: function(html) { contenido2 = $(html).find('#main-content'),tabla = $('div'); if($(html).find('#main-content')){ $("#models").html(contenido2);
//PUSHSTATE START
//PUSHSTATE
$('nav a').click(function(e){ myurl = $(this).attr("href"); href = myurl.replace(/^\//, "");loadContent(href); history.pushState( href,href, href); e.preventDefault();});
// THIS EVENT MAKES SURE THAT THE BACK/FORWARD BUTTONS WORK AS WELL
window.onpopstate = function(event) {console.log("pathname: "+location.pathname); loadContent(location);};
//FIN
}
}
});
}
//
//LOADMORE
//
}
}
});
}
loadstart();
</script>
<link rel="stylesheet" href="http://es.cam4.com/css/cam4_v5.5.css" media="screen,projection" type="text/css"/>
</head>
<body>
<nav><div id="models"></div></nav>
</body>
</html>
Código:
<?php
if(isset($_POST['id'])) { $id = $_POST['id']; } elseif(isset($_GET['id'])) { $id = $_GET['id']; } else { $id = 'female'; }
if (@eregi('TuUrl.com', $text)) {
$id = str_replace("http://TuUrl.com/cam4/", '', $id);
}
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://es.cam4.com/".$id);
echo $file;
?>
ACTUALIZACION :3 PUEDEN VEN EL RESULTADO EN http://laticatx.byethost10.com/cam4/
Y PARA LOS QUE NO LES CORRE
NUEVO CURL
Código:
<?php
if(isset($_POST['id'])) { $id = $_POST['id']; } elseif(isset($_GET['id'])) { $id = $_GET['id']; } else { $id = 'female'; }
if (@eregi('localhost', $text)) {
$id = str_replace("http://localhost/cam4/", '', $id);
}
header('Content-Type: text/plain; charset=utf-8;');
/* gets the data from a URL */
function get_data($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$file = get_data('http://es.cam4.com/female');
echo $file;
?>