Hi all . Could any one show me how i can log $_SERVER['HTTP_USER_AGENT'] to a file. I want to point diffrent programs to it to see what string they send.Thanks
Printable View
Hi all . Could any one show me how i can log $_SERVER['HTTP_USER_AGENT'] to a file. I want to point diffrent programs to it to see what string they send.Thanks
- Open file
- Append UA string
- Close file handle
Do you need cod?
penagate thank u for u reply. yes i need the code i just want to point diffrent sofware to it to see what strings they send.Thanks
thank u for u reply. Could tell me how in both php and visual basic app i can change the default string sent to $_SERVER['HTTP_USER_AGENT'] log file? For example if the default is :Microsoft URL Control - 6.00.8862\nQuote:
Originally Posted by penagate
and i want to send this :
Media Player Classic\nMedia Player Classic\nshoutcastsource\nMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {BE6B3C18-D43F-BBA3-8046-F416968AB502}; (R1 1.5))\n
Well PHP won't be sending a UA but if you want to do it in VB, you'll want to post into the VB forums.Quote:
Originally Posted by tony007
Most controls for VB have a UA Microsoft created and you'd have to completely write your own control to have a custom UA.
I do apologise. I meant the UA strings to be on separate lines. However I used the wrong quote marks :)
The second line should be thus:
PHP Code:fwrite($file, $_SERVER['HTTP_USER_AGENT']."\n");