Posted by Dave on 06/09/05 01:54
Martin Altschwager (cosas@altschwager.de) decided we needed to hear...
<snip>
> curl_setopt($file_contents, CURLOPT_RETURNTRANSFER, true);
> curl_exec($file_contents);
> curl_close($file_contents);
> echo "file-contents:<br>$file_contents<br>"; // debugging
> if ($file_contents) {
> $URL = $file_name;
> echo "in the loop: success<br><br>"; // debugging
> ...
<snip>
> ... and so on. $file_contents should be filled with the processed
> source of the file being run through that function, but instead I just
> get these "Resource id #...".
<snip>
$file_contents is your resource handle to the curl session. You've
set the curl option to return the transfer to you, but you don't
actually grab the data. What you should do is replace your curl_exec
line with something like...
$contents = curl_exec($file_contents);
$contents will then hold the processed source. Update the following
lines to refer to $contents also of course ;)
--
Dave <dave@REMOVEbundook.com>
(Remove REMOVE for email address)
[Back to original message]
|