curl-and-php
converting fopen and fread funtion to work as with CURL
Date: Sat, 10 Sep 2005 00:56:27 -0300
Hi there,
Just switched to Dreamhost and have found that they don't allow fopen
and fread... I have this little function and I was wondering if anyone
could tell me if this could work with CURL and if so give me a few
pointers on how to go about converting the function....
Function FetchAndGet($url) {
$tmon = fopen($url, "rb");
while (!feof($tmon)) {
$readfile = $readfile . fread($tmon, 1024);
}
fclose($tmon);
return $readfile;
}
Thanks!
Adam Docherty
Daniel Stenberg wrote:
> On Tue, 6 Sep 2005, Frederic Fleche wrote:
>
>> When I execute the following code lines I get an html code that list
>> a ftp directory.
>
>
> When you use a (HTTP) proxy with a FTP URL, the protocol spoken is
> effectively HTTP and not FTP. Thus the FTP-specific curl options no
> longer have any effect.
>
Received on 2005-09-10