curl-and-php
Re: curl itself acting as a proxy?
Date: Wed, 12 Jul 2006 11:09:24 +0200
I'm not sure if i worded it right.
basically what i want is this
client opens a page
on this page is a link to some advertising code
server checks for present clientcookie and uses libcurl to read the adcode from the advertising server passing the cookie
depending on the cookie information the ad is shown or hidden
if shown
- user presses the close button -> query sent to server and passed to adserver , response cookie read and passed to client
- user did not press the close button -> no change
On Wed, 12 Jul 2006 10:27:38 +0200
Darko Luketic <info_at_icod.de> wrote:
> Hello
>
> i was reading about curl and saw this page:
> http://www.higherpass.com/php/tutorials/Using-Curl-To-Query-Remote-Servers/3/
>
> <?
> $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);
> ?>
>
> this sounds almost like what i was looking for, except that i wouldn't want to use a
> remote proxy, but i want curl to act as a proxy, passing through cookies from the client and the server.
>
> is this possible?
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-07-12