Thanks- didn't realise that $_SERVER['QUERY_STRING'] was the query string
for the actual page. In that case what is the easiest way to extract the
search string from the referer web site? I would like to add this string to
the MYSQL database.
-Original Message-
From: Aidan Lister
I think I managed to do it myself-
?php
$referer =
http://search.yahoo.com/search?p=pianist+web+sites+designei=UTF-8fr=fp-ta
b-web-tcop=msstab=;
if (strpos($referer, q=) != FALSE) { $query = q=;} else if
(strpos($referer, p=) != FALSE) { $query = p=;}
$searcharray = explode(, substr($referer,
$referer =
http://search.yahoo.com/search?p=pianist+web+sites+designei=UTF-8fr=fp-ta
b-web-tcop=msstab=;
if (strpos($referer, q=) != FALSE) { $query = q=;} else if
(strpos($referer, p=) != FALSE) { $query = p=;}
$searcharray = explode(, substr($referer, (strpos($referer, $query)+2)));
3 matches
Mail list logo