Hi Guys,
I'm wishing to write a PHP script that parses an RSS feed on a local travel agent website, and emails me whenever there are deals to/from particular destinations. Downloading the RSS file seems easy enough, looks like I can use Preg_Grep to find the destinations I'm after and assign the values to an array. The bit I'm stuck with is how I write an IF statement that says, if any of the values within the array equal <destination> echo "There are flights to <destination>". I'll get it to email me the results but an echo will be fine for now.
Secondly, is there anyway to get a server to execute a PHP script server side? or should I be writing this in BASH to begin with? I don't particularly want to have to visit my PHP file each day for the check to be performed. a crontab or something would be ideal.
Any help appreciated,
Thanks