Updated how the script fetches files.

Since file_get_contents works on both urls and local files, I think its more suitable to use that.
Alternativly you might add more data to the curl.