Possible to do this in PHP?

software development

#1

Hi,

I want to write a script that checks for XML on specific sites daily without me having to manually execute, parse the XML, and post a link on my site to that site.

Do any of you know if it’s possible to to have some bot in PHP that could do this say… 2 times a day without me having to manually execute the script? If so, could you please direct me to where I might find this information. If not, do you know any other web languages out there that are self executing that could do this? I’ve been coding with OOP applicational languages for a while, and the way I’ve done it before was to just leave the program running. So any ideas or suggestions would be much appreciated

thanks


#2

In this case, what you’d want to do is use “cron” to execute the script twice daily.

There is a section is the knowledge base that talks all about cron

So, you’d type “crontab -e” and and add a line like this to the file:

(or use “php /home/you/yourscript.php”)

This runs the script every 12 hours.