Setting a user agent string in a PHP script?

    Date: 05/07/07 (Web Development)    Keywords: php, web

    Hi! I'm hoping someone here can help me find the answer to a problem that has been driving me nuts today.

    Can anyone here tell me how to set the user agent string in a PHP script that accesses a remote file? (My web host is Dreamhost, and I have PHP 5.2.1.)

    I've tried to find info about this on the web, but the info I found (such as in this tutorial) didn't work for me. I tried it in a script that remotely accessed a file on another website of mine, on which other site I then looked at the log and did NOT find the user agent string I had tried to set according to the instructions in the above-linked tutorial.

    Source: http://community.livejournal.com/webdev/405608.html

« Questionnaire || working with user-submitted... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home