123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|675|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> PHP Upload

Mon, 12 Apr 2010, 13:04
HoboBen
I can't remember what a file upload HTTP request looks like, or even how easy it is (I think a POST file upload is quite ugly actually).

If the file is small enough, could you use something like this and a POST request with the file contents added as a normal variable - and write a PHP script for the other end that writes the contents of that variable to disk?

-=-=-
blog | work | code | more code
Mon, 12 Apr 2010, 15:33
HoboBen
I think it would look like this:

Blitz sends this HTTP request: (HTTP request code)




On the PHP end, use $_POST['myData']

Play around with this, hopefully it will do what you need.

-=-=-
blog | work | code | more code
Thu, 22 Apr 2010, 07:59
HoboBen
It's hard to find a good example of code because most languages have file upload functionality tucked away in an API... But I think this might do it:





Then treat it as a normal PHP file upload.

For clarification, here's what that added bit looks like:



-=-=-
blog | work | code | more code
Thu, 22 Apr 2010, 18:18
HoboBen
Great stuff Glad it worked!