Re: http_user_agent and proxy

From: Date: Sat, 10 Feb 2001 08:48:39 +0000
Subject: Re: http_user_agent and proxy
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39064@lists.php.net to get a copy of this message
> I have this problem: > I am using a script like this to make php use a remote proxy to get pages using a remote proxy: > fputs($data1,"GET $myfiles/ HTTP/1.0\n\n"); > The problem is that i want to set the HTTP_USER_AGENT to something different than a blank field, but have no idea how to do that. Wild Guess: You know how you need *two* newlines after that GET to make it go? I think you can throw more stuff in there, and *then* the two newlines. In other words, it's just like headers... fputs($data1, "GET / HTTP/1.0\n"); fputs($data1, "HTTP_USER_AGENT spiderman\n"); fputs($data1, "\n"); #end of headers This is purely wild speculation on my part, but it does make sense it would work this way... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#39064) next »