Running scripts automatically
Posted 28 February 2006 - 07:33 PM
Here's my problem. I just finished programming an online game and I have some php script that generates xml files. Well, to do this, I type in the address of the file on the server and pass it to variables in the addressbar. It then queries a database and does everything fine and dandy. Problem is, I need it to do that automatically. I cannot be sitting at my computer 24-7 typing stuff in the address bar. Is there a way I can run the php script and pass those variables automatically?
Thanks a bunch, this is the last thing I need to do :-D.
Posted 28 February 2006 - 08:25 PM
[a href=\"http://www.hotscripts.com/PHP/Scripts_and_Programs/Guestbooks/more4.html\" target=\"_blank\"]http://www.hotscripts.com/PHP/Scripts_and_...ooks/more4.html[/a]
[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture
all the brothers were valiant!
Posted 01 March 2006 - 07:27 PM
You can have it do a number of things automatically, but not actually.. run? a web page. I'm not sure what you'd call that, but what I need it to do is actually.. hit? the page with one variable (origianlly I thought it was two, but only one is necessary) so it does updates to the database. If I'm misunderstanding cron, please let me know. Thanks
Posted 01 March 2006 - 07:44 PM
You could also have it run a task when an even happens... like have a page tell it to run the xml (or what ever your putting in the address bar...)
So a user will go to a page, that will make the cron run (there are other programs like it... cron is for Unix computer basicly) and cron will open your brower and go to a URL...
Posted 01 March 2006 - 07:54 PM
I guess my new question would be, is there a way to dynamically create cron jobs?
Here's what I need. I have 1 php file that will run fine from the address bar with the variable passed to it. What I need, since it's an online gaming site, is for it to update a set number of games per day. For example, I have games 1-10 full of players playing a game. I want game 1,2 to update on monday, game 3,4 to update tuesday, etc. But I need the cron job to be created when I "launch" the game to the public. So... is there a way to do that? Thanks so much.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users