Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/09/2009, 12:54
Avatar de MaBoRaK
MaBoRaK
 
Fecha de Ingreso: abril-2003
Ubicación: La Paz - Bolivia
Mensajes: 2.003
Antigüedad: 21 años
Puntos: 35
Respuesta: Remote file info sin descargar el archivo

loading.......

Bueno esto me ayuda por si alguien lo quiere:

Código PHP:
function ffi($url) {
            if (! 
$url_info parse_url $url )) {
                return 
false;
            }
            switch (
$url_info ['scheme']) {
                case 
'https' :
                    
$scheme 'ssl://';
                    
$port 443;
                    break;
                case 
'http' :
                default :
                    
$scheme '';
                    
$port 80;
            }            
            
$data "";
            
$fid = @fsockopen $scheme $url_info ['host'], $port$errno$errstr30 );
            if (
$fid) {
                
fputs $fid'HEAD ' . (isset ( $url_info ['path'] ) ? $url_info ['path'] : '/') . (isset ( $url_info ['query'] ) ? '?' $url_info ['query'] : '') . " HTTP/1.0\r\n" "Connection: close\r\n" 'Host: ' $url_info ['host'] . "\r\n\r\n" );
                while ( ! 
feof $fid ) ) {
                    
$data .= @fgets $fid128 );
                }
                
fclose $fid );
                return 
$data;
            } else {
                return 
false;
            }
        }
        
var_dump ffi "hhttp://exclusive-comps.com/d/ericson_sdk.zip" ) ); 
devuelve

Cita:
string(380) "HTTP/1.1 200 OK
Date: Tue, 22 Sep 2009 18:51:21 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8
Last-Modified: Tue, 08 Sep 2009 22:15:43 GMT
ETag: "51b8048-6f37cfe-4ea9c1c0"
Accept-Ranges: bytes
Content-Length: 116620542
Connection: close
Content-Type: application/zip

"
connection closed.
__________________

Maborak Technologies