so I’m writing a script, that will fwrite() a file. This file then needs to be sent to another server. I thought I would use the ftp wrapper, to open the file directly on the remote host.
Here’s the problem. My webhost only allows url_fopen on port 80, and they don’t allow any of the ftp_ functions.
So my question is: What would I do to transfer this document to another server? I might or might not be allowed to make some sort of script on the server that is to receive the file, but I doubt I could do anything useful.
Skipping every notes on how much your hosting sucks, there are few alternatives how to do this:
80(desperate situation requires desperate measures), but since you’re unable to use anyftpcommands, you’d have to implementftpfrom scratch or use full php implementation (not the best way to go).POSTrequest and simulate uploading file (my personal favourite)If you’ll use second or third (I recommend 3rd), don’t forget to implement authentication.