Re: fopen won't work :(

From: Date: Thu, 01 May 2003 07:53:36 +0000
Subject: Re: fopen won't work :(
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-145912@lists.php.net to get a copy of this message
Why aren't you using curl ? $url = "http://www.wiu.edu/stu/"; $ch = curl_init($url); //--> Sets session handle for CURL to use curl_setopt($ch, CURLOPT_TIMEOUT, 4); //--> CURL session options : number of seconds to allow each CURL command to execute curl_setopt($ch, CURLOPT_FAILONERROR, 1); //--> :silent failure if the HTTP code <> 300 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //--> :tells CURL to return the transfer rather than print it to stdout $content = curl_exec($ch); //--> executes CURL session and returns output to a string. The entire HTML for that page should now be stored in $content Jason =)

« previous php.general (#145912) next »