Reply to Re: how to read out the content of a file named domain.com/file.php?X=ABC

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация