Error accessing remote file. Please help.
Posted: Wed Feb 20, 2008 2:26 am
Hi,
I'm using the below code for accessing a remote file.
But it giving the following error:
Please help.
Thanks,
Ramki.
I'm using the below code for accessing a remote file.
Code: Select all
$filelocation = "\\fs-blr-03\str_audio1\Automation\Data_files\playback_automation_datafile_WMA_48kHz_full.txt";
$fp = fsockopen($filelocation, 80, $errno, $errstr, 30);
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: ".$filelocation."\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
$result .= fgets($fp, 128);
}
fclose($fp);
print $result;Code: Select all
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\Program Files\Apache Group\Apache2\htdocs\selected_stream.php on line 75
Warning: fsockopen() [function.fsockopen]: unable to connect to \\fs-blr-03\str_audio1\Automation\Data_files\playback_automation_datafile_WMA_48kHz_full.txt:80 (Unknown error) in C:\Program Files\Apache Group\Apache2\htdocs\selected_stream.php on line 75
Thanks,
Ramki.