I am having difficulties authenticating against a proxy server, basically I am trying to achieve a screen scrape type effect and I am using Pear’s HTTP Request package / module etc. The problem I am having is that the HTTP Request cannot pass through the web proxy and keeps giving me a 407 Authentication error! I have searched Google for the whole afternoon and I am unable to find any fixes I mean I have attempted the recommended way and I have tried the so called patched version of which involves sending the authentication request via the HTTP header but still no joy! If anybody has encountered this problem and knows of a fix I would be very grateful, for something which should be so simple... it is driving me crazy!!!
My code is as follows:
<?php
[INDENT]require_once "HTTP/Request.php";
$req =& new HTTP_Request("http://www.yahoo.co.uk");
$req->setProxy("Proxy@Location", 8080, "Username", "Password");
$response = $req->sendRequest();
if (PEAR::isError($response)) {
echo $response->getMessage();
} else {
echo $req->getResponseBody();
} [/INDENT]?>
Many Thanks in advance