We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › Web input/output
Page Index Toggle Pages: 1
Web input/output (Read 905 times)
Web input/output
Dec 24th, 2008, 8:00am
 
I have been working on a fractal generator in processing (see http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Exhibition;action=display;num=1228449676 )

I don't really intend to do this (time is limited), but I might if it's not too hard.

Suppose I were to make a community driven genetic fractal parameter tuner. Basically you go to the web page, and get a processing app that downloads a small text file detailing the current generation. It then generates some fractals which you choose from, and the results are returned to the server.

There are two things here I don't know how to do:
1) download the text file from a fixed address into the web app (it can be in a friendly directory next to the app on the server if desired).
2) return some data to the server. I could pack it into a url that a CGI on the server interprets if needed, but it would be best to not require the user to load a special page to submit the data.

If both of these happen to be rather easy, how would they be done?

Thanks! Processing is fun!
Re: Web input/output
Reply #1 - Dec 24th, 2008, 12:50pm
 
1: loadStrings("http://www.yoursite.com/foo/bar.txt");

2: You can use CGI or PHP or whatever and get it with (for instance) loadStrings("http://www.yoursite.com/foo/baz.php?newval="+myNewValueString);
Re: Web input/output
Reply #2 - Dec 24th, 2008, 7:21pm
 
Thanks, that should do it!
Re: Web input/output
Reply #3 - Dec 27th, 2008, 7:21am
 
I got it working with my GCI. Thanks!

http://craig-m.deviantart.com/art/Evolved-Fractals-107513732

Still lots to be done to both client and server though!
Page Index Toggle Pages: 1