Changeset 2581 for trunk/wp-includes/functions.php
- Timestamp:
- 05/03/2005 07:52:11 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r2572 r2581 1859 1859 } 1860 1860 1861 function wp_remote_fopen( $uri ) { 1862 if ( function_exists('curl_init') ) { 1863 $handle = curl_init(); 1864 curl_setopt ($handle, CURLOPT_URL, $uri); 1865 curl_setopt ($handle, CURLOPT_CONNECTTIMEOUT, 1); 1866 curl_setopt ($handle, CURLOPT_RETURNTRANSFER, 1); 1867 $buffer = curl_exec($handle); 1868 curl_close($handle); 1869 return $buffer; 1870 } else { 1871 $fp = fopen( $uri, 'r' ); 1872 if ( !$fp ) 1873 return false; 1874 $linea = ''; 1875 while( $remote_read = fread($fp, 4096) ) 1876 $linea .= $remote_read; 1877 return $linea; 1878 } 1879 } 1880 1861 1881 ?>
Note: See TracChangeset
for help on using the changeset viewer.