After requesting a HTTP URL with the fopen function, the web server's log files show the USER_AGENT that PHP supplied as "PHP/4.0.6". I want to change this (on the fly in code if possible). Simple question:
How? :)
Printable View
After requesting a HTTP URL with the fopen function, the web server's log files show the USER_AGENT that PHP supplied as "PHP/4.0.6". I want to change this (on the fly in code if possible). Simple question:
How? :)
so you want to change the log file? or what. I am not sure you can and why would it give you that?
When a web browser requests a webpage it sends the name of the browser (the USER_AGENT) along with the request. When PHP requests a webpage from a web server it sends a USER_AGENT like "PHP/4.0.6". I want to change the USER_AGENT string that PHP sends to the webserver.
what code are you using? I'ver never seen that. actually just the way it sounds is that you can't. but I want to look at it though