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.
IndexProgramming Questions & HelpPrograms › About the saveToWeb hack
Page Index Toggle Pages: 1
About the saveToWeb hack (Read 1008 times)
About the saveToWeb hack
Nov 28th, 2009, 5:51pm
 
Hey everyone:

I'm using the saveToWeb hack but I have a question about it:

Instead of creating a new file if the previous one exists, I would like to append values to the existing file.

For example, let's say I have an array of floats, and I'm adding 1 float every second, and now I want these values to be added to a .txt file -no matter the speed rate to be added to the file-, but what saveToWeb actually does is creating another file is the previous one exists.

Is there anyway to do this?

Thanks a lot in advance!
Re: About the saveToWeb hack
Reply #1 - Nov 29th, 2009, 2:13am
 
In your case, the saveToWeb is overkill.
You can just open a GET URL, ie. load something like: http://example.com/sketch/save.php?val=3.1415926
Thus the save.php script will get the float value and will do the job of appending it to the file.
Re: About the saveToWeb hack
Reply #2 - Nov 30th, 2009, 4:58am
 
You are right!
I modified the way using PHP persistence tutorial in learningprocessing.org and everything is easier.

Thanks a lot!
Page Index Toggle Pages: 1