jeje hola xD
he hecho este script parecido al de Xt3mp, un poco mas reducido, y legible, no necesita base de datos :/ (myu basico xD)
Código: php
Si les dice que la url no es valida, aunque si sea, utilicen este codigo. me imagino que los servidores de byethost no tiene permitido las conexiones externas :undecided:
Código: php
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login (no comprueba la url) <-- recomendado, url pequenia xD
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login (si comprueba la url)
Saludos!! :cool:
he hecho este script parecido al de Xt3mp, un poco mas reducido, y legible, no necesita base de datos :/ (myu basico xD)
<html>
<head>
<title>URLmini</title>
</head>
<body>
<center>
<h1>URLmini</h1>
<br><br>
<form method="post" action="">
<input type="text" name="url" value="http://"><br>
<input type="radio" name="tipo" value="1" checked>redireccionamiento Visible <input type="radio" name="tipo" value="2"> redireccinamiento Invisible<br>
<input type="submit" value="crear">
<input type="hidden" name="action" value="enviar">
</form>
<?php
$url=$_POST['url'];
$prefijo = substr(md5(uniqid(rand())),0,6);
$tipo=$_POST['tipo'];
$tipo1="<html><head><title>URLmini</title><META HTTP-EQUIV='refresh' CONTENT='0; url=$url/'></head></html>";
$tipo2="<html><head><title>URLmini</title></head><frameset rows=\"*\" frameborder=\"0\" framespacing=\"0\" border=\"0\"><frame src=\"$url\"></frameset></html>";
$tuweb=$_SERVER['SERVER_NAME'];
if($_POST['action']=="enviar"){
if($url==""){
echo"<script>alert('por favor ponga una url')</script>";
}else{
if(!file_get_contents($url)){
echo"<script>alert('La url no es valida!')</script>";
}else{
if($tipo==1){
mkdir("./$prefijo", 0777);
$fp=fopen("$prefijo/index.html","w");
fwrite($fp,$tipo1);
fclose($fp);
echo"<br><br><input type=\"text\" value=\"http://$tuweb/$prefijo/\">";
echo"<br><a href=\"http://$tuweb/$prefijo/\" target=\"_blank\">$prefijo</a>";
}else{
mkdir("./$prefijo", 0777);
$fp=fopen("$prefijo/index.html","w");
fwrite($fp,$tipo2);
fclose($fp);
echo"<br><br><input type=\"text\" value=\"http://$tuweb/$prefijo/\">";
echo"<br><a href=\"http://$tuweb/$prefijo/\" target=\"_blank\">$prefijo</a>";
}
}
}
}
?>
</center>
</body>
</html>
Si les dice que la url no es valida, aunque si sea, utilicen este codigo. me imagino que los servidores de byethost no tiene permitido las conexiones externas :undecided:
<html>
<head>
<title>URLmini</title>
</head>
<body>
<center>
<h1>URLmini</h1>
<br><br>
<form method="post" action="">
<input type="text" name="url" value="http://"><br>
<input type="radio" name="tipo" value="1" checked>redireccionamiento Visible <input type="radio" name="tipo" value="2"> redireccinamiento Invisible<br>
<input type="submit" value="crear">
<input type="hidden" name="action" value="enviar">
</form>
<?php
$url=$_POST['url'];
$prefijo = substr(md5(uniqid(rand())),0,6);
$tipo=$_POST['tipo'];
$tipo1="<html><head><title>URLmini</title><META HTTP-EQUIV='refresh' CONTENT='0; url=$url/'></head></html>";
$tipo2="<html><head><title>URLmini</title></head><frameset rows=\"*\" frameborder=\"0\" framespacing=\"0\" border=\"0\"><frame src=\"$url\"></frameset></html>";
$tuweb=$_SERVER['SERVER_NAME'];
if($_POST['action']=="enviar"){
if($url==""){
echo"<script>alert('por favor ponga una url')</script>";
}else{
if($tipo==1){
mkdir("./$prefijo", 0777);
$fp=fopen("$prefijo/index.html","w");
fwrite($fp,$tipo1);
fclose($fp);
echo"<br><br><input type=\"text\" value=\"http://$tuweb/$prefijo/\">";
echo"<br><a href=\"http://$tuweb/$prefijo/\" target=\"_blank\">$prefijo</a>";
}else{
mkdir("./$prefijo", 0777);
$fp=fopen("$prefijo/index.html","w");
fwrite($fp,$tipo2);
fclose($fp);
echo"<br><br><input type=\"text\" value=\"http://$tuweb/$prefijo/\">";
echo"<br><a href=\"http://$tuweb/$prefijo/\" target=\"_blank\">$prefijo</a>";
}
}
}
?>
</center>
</body>
</html>
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login (no comprueba la url) <-- recomendado, url pequenia xD
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login (si comprueba la url)
Saludos!! :cool:


solo guardan el codigo con el nombre que quieran y lo suben a un hosting junto con la imagen de fondo.
