Reputation: 1
is that it is possible to encode PHP script that can call a function of a class X automatically.
eg I have a class with a function LoadAuto RSS (), this latest load information from an RSS feed of CNN website, and I want every 5min after the functions will applelée automatiquement.yat there a solution?
thank you in advance
Upvotes: 0
Views: 940
Reputation: 4519
What exactly are you trying to achieve? If you want to regularly run a server-side function which updates values in a database, moves files on the server or similar stuff, you want to look into Cron jobs.
If, on the other hand, you want to display new content in a regular time interval to a user who has loaded your website into his or her browser, you are looking for an AJAX-based solution.
Example cron-job to invoke /run_me.php
every 5 minutes:
*/5 * * * * /usr/bin/wget -q -O /dev/null http://localhost/run_me.php
Upvotes: 1