Forum Moderators: coopster

Message Too Old, No Replies

http file transfer?

need to avoid using ftp port

         

pixeltierra

8:40 pm on Jun 29, 2006 (gmt 0)

10+ Year Member



I'm working with a desktop application writer who wants users to hit a button and have that upload a text file to the server. He wants to afoid the ftp port because it is sometimes blocked by network firewalls. The added complication is that it needs to be encrypted.

Is this possible? The only think I can think of is sending the text file as a query string perameter, and having php make a file out of it:

thescript.php?thetxtfile=asaksfdasjdflkjasdflkjasldkfjlaksflakdflasj...

This seems kind of dumb to me. Is there a better way?

avant_garde

12:06 am on Jun 30, 2006 (gmt 0)

10+ Year Member



Can't you just handle it like a standard http user agent file upload, like when you upload something via your Web browser? This is done over http and is accessible to php through the $_FILES array.

pixeltierra

4:49 pm on Jul 1, 2006 (gmt 0)

10+ Year Member



the $_files array is populated from post form data. Since the desktop app is the sending the data, I'd have to figure out how to mimic a post request with visual basic. I hear it should be able to do that, but I'm clueless.

mcavic

5:43 pm on Jul 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mimicking a POST request is relatively easy. All you need is the correct headers, which I don't know offhand. But encryption is the hard part. To post it to an https url, you'd need some sort of VB function similar to curl in linux.