• http://www.jesusgollonet.com/blog jesús gollonet

    yum! I was about to ask you for that as I have to do something similar. Thanks very much!

  • Pingback: thedemos » Blog Archive » Create JPG and upload to web server from Processing

  • http://www.jesusgollonet.com/blog jesús gollonet

    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

  • http://www.shiffman.net Daniel

    Ooops, thanks, fixed now!

  • A_Flama

    Very nice!!! I’m gonna try that :D
    Thank you!!!

  • http://www.sussmanprejza.com Mike Shaub

    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.

  • http://www.shiffman.net Daniel

    $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.

  • http://www.sussmanprejza.com Michael Shaub

    Thanks for the pointers Daniel. I think the biggest clue to others trying this and similar scripts with processing is that the error messages are all reported back in the processing window, not on the webpage or any server console (that I could find). I’m not sure if your solution was meant to work if the sketch was on a webserver, but that’s what I wanted to do and I could actually get it to work if I self signed the applet before uploading. I did find another approach by PhiLho on the processing boards that worked without signing the applet. Thanks, this helped get me there!

    Please check out my little game with image uploader at http://www.sussmanprejza.com/ar/card/