No lo iba a postear xD pero mejor si xD
Es un simple script para anonimizar links no es como lix.in sino mas com un puente de salida para quitar el referer, no esta pensado para que el usuario final no sepa a que url va sino para poder poner publicidad en los enlaces o hacer que vean algo que gusten antes de que aprovechen la descarga o el enlace.
Pruebenlo y diganme que tal esta, el diseño se lo dejo a quien lo quiera usar
<?php
/* Limpia la variable que queramos */
function limpia($a){
/* Paso a minusculas */
/* Quita http:// */
/* Limpia caracteres html */
return $a;
}
/* Obtiene el nombre de la pagina en que estara el script */
$servidor = $_SERVER['HTTP_HOST'];
/* Obtiene la carpeta donde esta el script */
$path = $_SERVER['PHP_SELF'];
/* obtiene el valor de nuestra variable xD */
$page = @$_GET['page'];
$var = @$_GET['url'];
/* Limpia la variable usando la funcion anterior */
$var = limpia($var);
$page = limpia($page);
/* Si $var esta vacia se muestra el formulario
para ingresar una direccion ;) */
/* Si $page esta vacia entonces pregunta por $var xD */
/* Si $var esta vacia muestra el formulario para ingresar una direccion */
echo '
<!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=utf-8" />
<title>Anonimizer - Inicio</title>
</head>
<body>
<form action="" method="get">
<b>Ingrese una dirección</b><br />
<input type="text" name="url">
<input type="submit" value="Anonimizar!">
</form>
</body>
</html>
';
/* Si $var no esta vacia muestra los enlaces para que el usuario sepa que enlaces
poner en foros o en su sitio */
}else{
echo '
<!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=utf-8" />
<title>Anonimizer - Obtener</title>
</head>
<body>
<form>
<b>Enlace directo:</b><br />
<input size="60" type="text" value="http://',$servidor,$path,'?page=',$var,'"><br />
<br /><b>Enlace HTML para sitios web y blogs:</b><br />
<textarea rows="4" cols="50"><a href="http://',$servidor,$path,'?page=',$var,'" title="Enlace anonimo" target="_blank">Enlace anonimizado!</a></textarea><br />
<br /><b>Enlace Para foros (bbcode):</b><br />
<textarea rows="4" cols="50">[url=http://',$servidor,$path,'?page=',$var,']Enlace anonimizado![/url]</textarea><br />
</form><br /><br />
<a href="http://',$servidor,$path,'?page=',$var,'" target="_blank">Probar enlace</a>
</body>
</html>
';
}
/* Si $page tiene un valor entonces muestra el valor anonimizado xD
si el valor no es correcto entonces se jode el anonimizador malintencionado ¬¬ */
}else{
echo '
<!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=utf-8" />
<META HTTP-EQUIV="REFRESH" CONTENT="6;URL=http://',$page,'">
<title>Anonimizer - Obtener</title>
</head>
Por favor espere 5 segundos o haga click <a href="http://',$page,'">aqui</a>
</body>
</html>
';
}
?>
Es bastante simple de usar asi que si alguien tiene una duda que la postee no hare un tutorial xDDDDDDD
Saludos y gracias por lo que he aprendido y seguire aprendiendo.
PD: Sip soy noob y? Tu naciste sabiendo? xD