Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am trying to access the xml file from the other site, the code of ther program is belowCode: Select all
<?php
// Define a context for HTTP.
$aContext = array(
'http' => array(
'proxy' => "tcp://172.16.16.3:8080", // This needs to be the server and the port of the NTLM Authentication Proxy Server.
'request_fulluri' => True,
'userid'=>"bravi",
'password'=>"bravi123"
),
);
$cxContext = stream_context_create($aContext);
// Now all file stream functions can use this context.
$sFile = file_get_contents("http://www.rediff.com/rss/inrss.xml", False, $cxContext);
echo $sFile;
?>Code: Select all
Warning: file_get_contents(http://www.rediff.com/rss/inrss.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web P in C:\webs\test\simple.php on line 20it is giving the above error how to set the proxy authentication.
my system details are username ="bravi" and password ="bravi123"
my proxy server address is 172.16.16.3 and port is 8080.
1)how to set the paramerters to access the xml file.
2)can you send me the excetuted code.
thanks in advance
ravi
JayBird | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]