Thread: cURL
View Single Post
Old 10-21-2007, 04:38 PM   #1 (permalink)
WinSrev
The Acquainted
Inquisitive 
 
WinSrev's Avatar
 
Join Date: Sep 2007
Posts: 133
Thanks: 6
WinSrev is on a distinguished road
cURL

Hey,

Was just wondering if this little bit of code could be converted to a cURL function instead of File_get_contents, a little but stumped about how to do that with this code, was wondering if anyone could do it? thanks.

PHP Code:
    function file_get_content$url )
    {
        for( 
$i 1$c <= $this->conf['tries']; $c++ )
        {
            
$file = @file_get_contents$url );
            if( 
$file != FALSE )
            {
                return array( 
=> TRUE=> $file );
                break;
            }
        }
        return array( 
=> FALSE=> '' ); 
    } 
Send a message via ICQ to WinSrev
WinSrev is offline  
Reply With Quote