You want to open a file that's accessible to you via HTTP or FTP.
When
fopen( ) is passed a filename that begins with
http://, it retrieves the given page with an
HTTP/1.0
GET request (although a
Host: header is also passed along to deal with virtual hosts). Only the
body of the reply can be accessed using the file handle, not the headers. Files
can be read, not written, via
HTTP.
To open URLs that require a username and a password with
fopen( ), embed the
authentication information in the URL like this: