Hi all,
I have implemented a script on my page, wich displays the Google Search Term that brought visitors to my Website.
Now I like to call this Search Term something, so I can pass it on to another page via $_GET
It should be quite simple, but I can not get it to work. The script look like this:
$referer= $_SERVER['HTTP_REFERER'];
//find the search query from google that brought them here
$qref= strpos($referer,'google');
if (isset($SERVER['HTTP_REFERER'])) {
$query = array();
parse_str(parse_url($SERVER['HTTP_REFERER'], PHP_URL_QUERY), $query);
print $query['q'];
}
I seems like I cant just pni = $query
I am a little puzzled.
Can you help?