Continuous XML fetching... - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Continuous XML fetching... (/showthread.php?tid=7327) |
Continuous XML fetching... - El Forum - 04-03-2008 [eluser]Unknown[/eluser] Hi, I have just started using code igniter, and I am already getting on very well with it, due to my past experience in a wide array of languages! There is one thing I don't know how to go about doing, both with code igniter and in PHP. I simply want to fetch an XML file every xx seconds, which will in my case then input the data from the XML into a database. I don't know if there is a main loop, or where should I make one. I have no idea how to go about this! Any suggestions will be appreciated! Thanks Continuous XML fetching... - El Forum - 04-03-2008 [eluser]Kemik[/eluser] Use a cron job? Continuous XML fetching... - El Forum - 04-03-2008 [eluser]bradym[/eluser] There is no main loop in PHP. As an interpreted language, a PHP script only runs until it finishes the task. It doesn't keep running indefinitely. You'll need to setup a cron job (if you're on a *nix system) or a scheduled task (if you're on a windows system). Brady Continuous XML fetching... - El Forum - 04-04-2008 [eluser]Symcrapico[/eluser] What about an AJAX call into a setTimeout? Continuous XML fetching... - El Forum - 04-04-2008 [eluser]GSV Sleeper Service[/eluser] cron is the way to go. this didn't really need saying, but I needed an excuse to comment on Symcrapico's avatar! Bob Ross was da man! RIP Bob |