Need simple PHP script to read a URL that returns results from google.
Google will return from 1 to n pages so script will need to call the pages (Next) until each page is processed. This will be on average 4 pages. For each page, the following flow will apply:
1) fetch page with get_url or similar.
2) preg_matchall to parse out the Title,email address and AD URL.
3) assuming this has all been placed in an array, check MYSQL DB for key ADURL to see if it is already there. If it IS, loop, else continue
4) send email using GMAIL server to email address we got in step 2 with subject of the TITLE we got in step 2 and the body message that can be hardcoded in the script for now.
5) write data to MYSQL DB
That's it. Don't need any admin or anything like that.
I will call the script via cron every n minutes so script must not output to screen.
This will be easy for someone that is good with regex.
The url to ftech is:
[login to view URL]:+-re+site:craigslist.org&start=0&sa=N
Thanks!