I need a PERL/CGI application in three parts, lets call it three programs:
1. The first program should add, edit, delete transactions saved in an MySQL database. Each transaction contains 5 fields: Project number, Phrase 1, Phrase 2, date and time it was added.
2. The second program reads the MySQL database sorted on date and time. This program should be running until it finds a transaction where the date field is empty. Transaction by transaction it should:
a. Do a search in Google using Phrase 1 which results in a page normally containing 10 organic search results for Phrase 1 and 1 to 13 ads from Google Adwords.
b. Do a trace of each URL found in the (10 organic + 1 to 13 ads) result page searching for Phrase 2 on the landing page for those URL’s.
c. If Phrase 2 is found then save the text displayed at the search page (step a above), Project number, Phrase 1, current date, current time, search engine (G/Y/M), the URL for the landing page (step b above) in another table.
d. Repeat step a to c with the same Phrase 1, but searching in Yahoo and MSN.
e. Replace the time mentioned in step 1 to current time + nn minutes where nn can be 1 to 100000.
f. Start over with the next transaction at step a.
3. The third program should accept a Project number, start & end and the possibility to select which Phrase 1 in case there are more then one, date and then display all results for this Project and within the selected period, from table 2.
Program 1 and 3 require a username and password when entered.