By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

How to execute PHP file with parameters automatically?

P: 97
Hi there,

I need to (re)create every couple of days a few dozen SVG files, which are created through the same PHP file, passing four parameters. I have programmed the generic PHP file so that it overwrites already created files after, say, 7 days.

But at the beginning (after having changed any coding in the PHP file) I have to launch those three dozen files always by hand. Instead I would like to use a script which would launch one file (with a 30 second break in-between, as the generation of each file takes quite some time) after another, including those parameters.

Is that possible, and how would I do that?

Thanks for any hints!
Jan 13 '12 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,584
change your PHP code so that it doesn't need "already created files", and just creates them if they're not there.

Give us an example of this script is used. I'm not clear on your problem.

Jan 13 '12 #2

P: 97
Thanks for the reply. The code does indeed create the files if they are not there. But it does it only when a user clicks on one of the many "links" (better, the four different options), which then calls the SVG file. If the SVG is not there, it will be created. But I would like to create them at the first instance, because I don't want the user to have to wait for 30 seconds or even a minute, which is the time to create the file. Once created, the next user then gets the cached file will, which only takes a second.

So, instead to be forced to manually launch these files one by one so that they are created, I would like to use a code in the style:

CREATE svg file with parameters x,y,z
WAIT 30 seconds
CREATE svg file with parameters x1,y,z
WAIT 30 seconds
CREATE svg file with parameters x,y1,z
WAIT 30 seconds

Jan 16 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.