Jump to content

Archived

This topic is now archived and is closed to further replies.

pkrtech

php exec question

Recommended Posts

I am using

[code]exec( 'wget http://www.test.com/run.php > /dev/null &' ); [/code]

to run a background process being called from a php page, it runs fine. However everytime it runs it places a empty run.php.1, run.php.2 ect ect. Now the script can run like 25 times an hour so thats alot of files I have to delete to clean up.

Is there some way to make it so it doesnt add the file ?

Share this post


Link to post
Share on other sites
This will download the file once, then for each additional hit, will rewrite to that same file.
[code=php:0]
exec( 'wget -r http://www.test.com/run.php > /dev/null &' );
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.