Changeset 2581 for trunk/xmlrpc.php

Show
Ignore:
Timestamp:
05/03/05 07:52:11 (4 years ago)
Author:
matt
Message:

Use CURL if available, possible fix for http://mosquito.wordpress.org/view.php?id=1166

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/xmlrpc.php

    r2399 r2581  
    11631163 
    11641164        // Let's check the remote site 
    1165         $fp = @fopen($pagelinkedfrom, 'r'); 
    1166         if (!$fp) { 
    1167             // The source URI does not exist 
     1165        $linea = wp_remote_fopen( $pagelinkedfrom ); 
     1166        if ( !$linea ) 
    11681167            return new IXR_Error(16, 'The source URI does not exist.'); 
    1169         } 
    1170  
    1171         $puntero = 4096; 
    1172         while($remote_read = fread($fp, $puntero)) { 
    1173             $linea .= $remote_read; 
    1174         } 
    11751168 
    11761169        // Work around bug in strip_tags(): 
     
    11801173        // I don't think we need this? -- emc3 
    11811174        //$linea = preg_replace('#&([^amp\;])#is', '&$1', $linea); 
    1182         if (empty($matchtitle)) { 
     1175        if ( empty($matchtitle) ) { 
    11831176            preg_match('|<title>([^<]*?)</title>|is', $linea, $matchtitle); 
    11841177        }