Can anyone help,
Trying to read file on another server and I keep gettin this error.

Warning: fopen(http://servername/CampLoad/musa0705.csv): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\Program Files\Apache Group\Apache2\htdocs\testinc.php on line 2

Warning: fclose(): supplied argument is not a valid stream resource in C:\Program Files\Apache Group\Apache2\htdocs\testinc.php on line 3

Here's my script:
<?php
$fp = fopen("http://servername/CampLoad/musa0705.csv", "r");
fclose($fp);

?>

    you will need to take a look at [man]fsockopen[/man]

      I'm pretty new to php, but the examples of fsockopen seem alot harder than fopen. But if this is the way to go then I guess I'll research on that.

        I'm not so sure fsockopen() will fix the error. Are you sure the file exists? Do you have permission to access it? It's clearly trying to get it, but it says the request failed--no file there?

          Write a Reply...