How to simulate another browser
| From: | Marek Blahus | Date: | Mon, 17 Jul 2000 18:00:33 +0000 |
| Subject: | How to simulate another browser | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6941@lists.php.net to get a copy of this message | ||
Hi there.
Does anybody of you know simulate another browser when accessing pages on
the internet by FOpen? I'm programming a WAP service that opens some address
by this command:
FOpen("http://www.ceskywap.cz/");
"Ceskywap.cz" server is my server and I programmed a script
http://www.ceskywap.cz/index.php3 which takes
variable $HTTP_ACCEPT and test
it for containing "wap" string. If does, then it returns content for WAP
browsers, if doesn't, it returns content for regular HTML browsers.
I have to get WAP content, so I have to add "wap" to $HTTP_ACCEPT in order
to receive WAP content, not HTML content.
Do you know how to set $HTTP_ACCEPT when using FOpen? Or have I to do it
another way?
Some other scripts that I am not managing also determines a type of content
from the value returned by GetBrowser(). Is there any way to change that
value when using FOpen?
Thank you very much.
Marek Blahus
(blahus@seznam.cz)