_Global's code has two faults: 1) If it's a remote server, I doubt you can simply fopen() a connection and write (does PHP automatically use the PUT syntax? Even if so, that's rarely ever used these days...), and 2) fread()'ing something isn't the objective.
If the remote server is your own, you could create a PHP script on that server that reads in data from an HTTP request and writes that data to a (local) file.