fopen() in PHP
Hey LQ,
Just a quick question. If I were to use PHP to read an RSS page that is online, what "browser" (user-agent) would the webserver detect my PHPs request as? If that doesn't make any sense I'm referring to information such as Code:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 ( .NET CLR 3.5.30729) |
Good question.
It depends, at least in part, on HOW you're using PHP to read the URL. Here's an example snippet, that uses PHP's built-in "DOMDocument" class: http://www.softarea51.com/tutorials/..._php.html#code Code:
<?php You can easily verify this by using the above code to access a sample xml document on your own web server, and see what the web server reports (e.g. look at your access_log). |
Hi
From php.ini: Quote:
|
All times are GMT -5. The time now is 02:54 PM. |