Proba este:
Si sigue sin funcionar (Desconozco porque no funciona ahora):Código PHP:<?
global $link_head;
global $link_time;
?>
<html>
<head>
<title>Redirigiendo a <?=$link_head?></title>
<meta http-equiv="refresh" content="<?=$link_time?>; URL=<?=$link_head?>">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<center>
<h1>Cargando la URL...</h1>
<br />
<img src="http://crix.us/loading.gif" />
<p>Por Favor espere <?=$link_time?> segundos mientras es redirigido hacia <strong><a href="<?=$link_head?>"><?=$link_head?></a></strong> Gracias.</p>
<?php
$url = $link_head;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $urlstring);
curl_setopt($ch, CURLOPT_REFERER, "http://www.tusitio.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
if($data)
{
$ini = strpos ($html, '<title>');
$fin = strpos ($html, '</title>');
$long = $fin - $ini - 7;
$titulo = 'Titulo curl: ' . substr ($html, ($ini+7),$long);
}
else
{
$titulo = 'No se pudo obtener el título';
}
echo $titulo;
// Si no se imprimen correctamente las tildes, quitar el siguiente comentario
// echo utf8_encode($titulo);
?>
<br />
</center>
<div class="clearer"></div>
</div>
</body>
</html>
Crea un nuevo archivo PHP y pega esto:
Súbelo y pasanos la URL...Código PHP:<?php phpinfo(); ?>
Wiiiiiiiiiiiiii, Fazzzio v1.1 (y en forobeta también!)
Tonto de mi... -.-
Código PHP:<?
global $link_head;
global $link_time;
?>
<html>
<head>
<title>Redirigiendo a <?=$link_head?></title>
<meta http-equiv="refresh" content="<?=$link_time?>; URL=<?=$link_head?>">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<center>
<h1>Cargando la URL...</h1>
<br />
<img src="http://crix.us/loading.gif" />
<p>Por Favor espere <?=$link_time?> segundos mientras es redirigido hacia <strong><a href="<?=$link_head?>"><?=$link_head?></a></strong> Gracias.</p>
<?php
$url = $link_head;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $urlstring);
curl_setopt($ch, CURLOPT_REFERER, "http://www.tusitio.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$html = curl_exec($ch);
curl_close($ch);
if($html)
{
$ini = strpos ($html, '<title>');
$fin = strpos ($html, '</title>');
$long = $fin - $ini - 7;
$titulo = 'Titulo curl: ' . substr ($html, ($ini+7),$long);
}
else
{
$titulo = 'No se pudo obtener el título';
}
echo $titulo;
// Si no se imprimen correctamente las tildes, quitar el siguiente comentario
// echo utf8_encode($titulo);
?>
<br />
</center>
<div class="clearer"></div>
</div>
</body>
</html>
Wiiiiiiiiiiiiii, Fazzzio v1.1 (y en forobeta también!)
Con PHP SI se puede. Con Ajax creería que si, aunque no estoy seguro.
Y ahora mismo está funcionando! No con Google, por lo visto bloquea algunas cositas:
Redirigiendo a http://forobeta.com
Wiiiiiiiiiiiiii, Fazzzio v1.1 (y en forobeta también!)
No hay problema
Solo unas cosa, agrega esto:
Para que quede así:Código PHP:curl_setopt($ch,CURLOPT_FOLLOWLOCATION);
Y edita tusitio.com por la URL de tu sitio, obviamenteCódigo PHP:curl_setopt($ch, CURLOPT_REFERER, "http://www.tusitio.com");
curl_setopt($ch,CURLOPT_FOLLOWLOCATION);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
PD: Elimina el archivo info.php![]()
Wiiiiiiiiiiiiii, Fazzzio v1.1 (y en forobeta también!)
Listo. Buenisimo amigo, dime que te parece como ha quedado, vendrían bien algunas sugerenciasRedirigiendo a http://www.forobeta.com/
Ya llege, pero que tu no querias convertir todo un texto con links a enlaces con el nombre de la web? . Pense que era más complicado.
Actualmente hay 1 usuarios leyendo este tema. (0 miembros y 1 invitados)