Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/01/2006, 10:27
Avatar de dopon
dopon
 
Fecha de Ingreso: julio-2005
Ubicación: Cucuta / Colombia
Mensajes: 493
Antigüedad: 21 años, 3 meses
Puntos: 1
hOLAS TRATE DE HACERLO LO MAS SIMILAR EN CUANTO ALOS NOMBRES DE LAS VARIABLES PARA QUE MAS O MENOS TE GUIES

espero derte de ayuda ;)

Código PHP:
function GetHTML($strURL)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_URL,$strURL);
$buffer = curl_exec ($ch);
curl_close ($ch);
unset(
$ch);
return 
$buffer;
}


function 
GetTexto($TheStr, $sLeft, $sRight){
    
$pleft = strpos($TheStr, $sLeft, 0);
    if (
$pleft !== false){
        
$pright = strpos($TheStr, $sRight, $pleft + strlen($sLeft));
        If (
$pright !== false) {
            return (
substr($TheStr, $pleft + strlen($sLeft), ($pright - ($pleft + strlen($sLeft)))));
        }
    }
    return 
'';
} 
y se puede llamar asi :

Código PHP:

$MM_URL 
= "http://www.forosdelweb.com";
$MM_URLHTML = GetHTML($MM_URL);
echo 
GetTexto($MM_URLHTML,"<title>","</title>")