It works perfectly on localhost with Xampp, but when I try it on my server (host-ed.net), fopen can\'t open any url, it only works for files without http.
&l
As http://php.net/manual/en/function.fopen.php states,
If filename is of the form "scheme://...", it is assumed to be a URL and PHP will search for a protocol handler (also known as a wrapper) for that scheme. If no wrappers for that protocol are registered, PHP will emit a notice to help you track potential problems in your script and then continue as though filename specifies a regular file.
I would therefore assume that there is no registered wrapped for url's, and php is treating that as a regular filename, which doesn't exist.