The problem may not be with your code per se, but as Phillip pointed out, you might need to use curl (http://www.php.net/manual/en/ref.curl.php). Normally you should be able to use either fopen or file to retrieve it, but from the looks of it, your server needs authentication and that could be where your script is running into problems.

For the record here's a little bit about file() and how to use it:

file() works differently then fopen(), and is usually only useful if each record in your flat-file databse is delimited by newline characters.

Here's one example of how you can use it:

$filecontents = file("/path/to/file.txt");
while(list($key, $var) = each($filecontents)) {
 echo "<b>".$key."</b> ".$var."<br>";
}

This would output the contents of the file with the line number preceding each line. file() is nice because it does all of the work for you.

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://phantom.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to