Use Curl instead of file functions

Use curl as some hosts don't allow the file functions for remote urls