Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/05/2005, 09:47
freedatos
 
Fecha de Ingreso: abril-2003
Mensajes: 587
Antigüedad: 21 años
Puntos: 5
eL CODIGO ES:

Código PHP:
<? 
                  
function remote_filesize($url){ 
   
$url_p parse_url ($url); 
   
$host $url_p['host']; 
   if(isset (
$url_p['port'])) 
     
$remote_port $url_p['port']; 
   else 
     
$remote_port 80

   
$fp fsockopen ($host$remote_port); 
   if(!
$fp
     return 
0
   else 
   { 
     
fputs($fp'HEAD '.$url." HTTP/1.1\r\n"); 
     
fputs($fp'HOST: '.$host."\r\n"); 
     
fputs($fp"Connection: close\r\n\r\n"); 
     
$headers ''
     while (!
feof ($fp)) 
       
$headers .= fgets ($fp128); 
   } 
   
fclose ($fp); 

   if (
preg_match('/Content-Length:\s([0-9].+?)\s/'$headers$matches)) 
     return 
$matches[1]; 
   else 
     return 
0
  } 
echo 
remote_filesize();
?>
Y RECIBE URLS COMO:
http://www.okysex.com/exit.php?id=.....images/003.mpg

ESO ES...
__________________
Si la vida te da la espalda tocale el culo