I require a PHP script to parse variables from the referrer. It will then write parsed data to a table in a mySQL db. It will also pass the parsed kw variable to a redirect I use in the format $kw= "KEYWORD"
The parts of the referrer I require written to the db are 'referring domain' and 'keyword'. The query construction will be in various formats, depending on the referrer.
Some examples (not exhaustive)
'q,query,?_nkw,form_keyword,buscar,search_query,field-keywords,search/q/,satitle,KW,k,OVKEY,keyword,searchfor' The end delimiter will be usaully '&'
Special considerations are queries from [login to view URL] & dogpile. For [login to view URL], if the query is from Yahoo the delimiters will be 'OVKEY=KEYWORD&'
If from google it will be 'search/q/KEYWORD/s/google/'
If dogpile 'results/keyword/KEYWORD/
See attached file for url examples.
For the db you will need to create a table in an existing db. The table will have 2 fields, one for referring domain, one for the kw.
EG:
CREATE TABLE `DB_NAME`.`TABLE_NAME` (
field parameters
) ENGINE = InnoDB DEFAULT CHARSET = latin1;
then write
I assume thee flow of logic will be:
Check if referrer string
if not
then set $kw variable to default 'keyword' and redirect visitor
if set
then parse domain and check for query string
if no query string
then set $kw variable to default 'keyword' and redirect visitor
if query string set $kw variable & redirect and write the domain & kw to db
<=======================================================================>
Do not bid without reading and understanding my requirements fully. If you have any questions, please ask.
I'll only respond to bids accompanied by a PM. If you leave a bid without a corresponding PM, then the bid will be ignored.
Thank you.