I have a url that gives xml output. This requires a username and password, which I can get through the browser using the format:
http: // username: password@url.com
However, when I try to access it through a php file, I get a forbidden ban:
$url = "http://username:password@url.com";
$xml = @simplexml_load_file($url);
print_r($http_response_header);
I tried using curl and installed the user agent in the browser, but this still does not reflect the data.
EDIT:
I also tried using pear http request 2, which also gives the forbidden 403
source
share