curl-and-php
Re: configuring curl with proxy servers
Date: Mon, 30 Jun 2008 22:16:50 +0500
Have you dont http sniffing to see if the proxy works like this on itself?
it might use some session/cookie that you will have to pass in cURL session
to successfully use proxy.
Regards,
Haroon Ahmad
Expert Offshore Web Developer
2008/6/30 Pragya Ratna Bajracharya <pragyabchar_at_gmail.com>:
> Hello all,
>
> Based on this following example
>
> <?
>
> $ch = curl_init();
>
> curl_setopt($ch, CURLOPT_URL, 'http://www.example.com');
>
> curl_setopt($ch, CURLOPT_HEADER, 1);
>
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>
> curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
>
> curl_setopt($ch, CURLOPT_PROXY, 'fakeproxy.com:1080');
>
> curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'user:password');
>
> $data = curl_exec();
>
> curl_close($ch);
>
> ?>
> I changed the value of the proxy url and proxy port to my own data.
>
> When i try to run the above script, it returns false on the $data. Is there
> some special configurations to be done on the server?
>
> I am using PHP Version 4.4.8 and the curl installed on the server is
> libcurl/7.16.0 OpenSSL/0.9.7m zlib/1.2.3.
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-06-30