I need a php, mysql script to run on my linux server. It will be for my use only (not for public use). It will
have an upload form, where I will be able to submit four csv files.
The four files will have these fields (columns)
FILE ONE
id
email
date1
FILE TWO
id
domain1
FILE THREE
name
email
date2
domain2
FILE FOUR
domain3
keywords
FILE FIVE
domain4
The script must do three things:
1) Merge these five files, so that we have one file with these fields
id
email
date1
domain1
date2
domain2
domain3
domain1keywords
domain2keywords
domain3keywords
The id in FILE ONE and FILE TWO corresponds, so you will use that as the unique id to put domain1 with the
correct id.
The email1 in FILE ONE and FILE THREE corresponds, so you will use that as the unique id to put name, date2 and
domain2 with the correct id.
FILE FOUR contains all the domains in the FILE TWO and THREE, so domain3 is a domain (such as [login to view URL]),
and keywords are the keywords, such as cheap boat. These keywords have to be entered for the corresponding
domains as domain1keywords,domain2keywords and domain4keywords in the merged file.
2) The script will then go to the url (website) in domain1, and scrape the Title Tag and Description Tag from
that website and enter that as two new fields in the merged file - Title and Description. (I have curl
installed on my server).
3) The script will then compare domain4keywords with domain1keywords, domain2keywords, DescriptionTAg and
TitleTag repectivley, and if they match as a phrase (that is all the keywords appear in that exact order) it
will be marked as a FULLMATCH and if all the keywords match, but not in that exact order, it will be marked as
HALFMATCH, and if some of the keywords match, but not all of them, it will be marked as SOMEMATCH.
So the final merged file will look like this:
id
email
date1
domain1
date2
domain2
domain3
domain1Titletag
domain1descriptiontag
domain1keywords
domain2keywords
domain4keywords
domain4keywordsmatchdomain1keywords
domain4keywordsmatchdomain2keywords
domain4keywordsmatchdomain1Titletag
domain4keywordsmatchdomain1descriptiontag
domain1response (enter no response if the website does not repond in step 2)
This file must be made available as csv file for download.