Example source code available from that ants thing.
P5 source: http_post.zip
PHP source: upload.phps
7 Responses to “Create JPG and upload to web server from Processing”
- 1 Pingback on May 3rd, 2006 at 4:12 am
Example source code available from that ants thing.
P5 source: http_post.zip
PHP source: upload.phps
yum! I was about to ask you for that as I have to do something similar. Thanks very much!
btw, i’m trying to open the http_post.zip but i can’t. It seems to be corrupted. Could you check it, please?
Thanks again
Ooops, thanks, fixed now!
Very nice!!! I’m gonna try that
Thank you!!!
This looks great! I have the source and would like to try out the program. I am so unfamiliar with server paths and PHP though that I’m not able to setup the directories properly. Could you please explain (iike I’m 5 years old) what folders I should setup on my server? I do know about setting permissions, but the relative folders and where slashes should and shouldn’t go seems to escape me. in your PHP there are 2 paths:
$uploaddir = ‘/home/whatever/’;
$uploadrelativefile = ‘http://www.whatever.net/whatever/’ . $uploadfilename;
and in the sketch there this:
String url = “http://www.mydownain.com/myphp.php”
Could you explain where the processing sketch goes, the folder for uploaded images, and the php script? Thanks, this is pretty nice.
$uploaddir = ‘/home/whatever/’;
The above is the folder you want to upload the files to using the real server path.
$uploadrelativefile = ‘http://www.whatever.net/whatever/’ . $uploadfilename;
The above is the URL path to the file, i.e. what you would type into a browser to see it. These two paths depend on your server configuration.
and in the sketch there this:
String url = “http://www.mydownain.com/myphp.php”
This is the path to where you put your PHP code, again what you would type in the browser to find it.