well, i want to run a curl script every 1 hour,can i do it hidden serverside without anyone accessing the page?
In other words, what he's trying to say is that you set up cron to run your php script every hour. The setup example is like what foxbsd said. Do more reading on what a server cron does so you'll understand more.
Without cron set up on your server there are two methods. 1) You can setup external scheduler somewhere else and call your script from there via http request. Or call that manualy every hour. 2) have another script run with no execution time restriction and call your script from it every hour.
I thing the best idea for this is to write another script with no execution time restriction and that script will then call your origenal script after every hour
You can do it with PHP, it's more troubles and there are some conditions: * The exec() function must be available * You need to have a decent number of visits. Than you can may a scripts which do the following: * Check when the script was run * If it was run in more than one hour ago it will run it again and store the new time * otherwise do nothing Time can be stored as a timestamp on a file
With enough traffic, you can always just set an include on every page called something like tasks.php and then just have a little condition that only allows the tasks to be run if the time conditions are met. Take a look at the tasks system on MyBB or similar scripts... other than that, cron is the best option