Hi people.
I have a script to extract the GOOGLE query string from the referrer which works fine and dandy ( there is more code to make it safe but I've cut that out )
$ref = explode("?",$refer,2);
$refer = $ref[0];
$options = $ref[1];
$options = urldecode($options);
parse_str($options);
if(empty($q)==FALSE)
{
$qoogle_query = $q;
}
The refer is pass via a <IMG> - using a escape(document.referrer) Java command -
<script language="Javascript">
<!--
document.write('<IMG HEIGHT=0 WIDTH=0 SRC="http://www.saintsforthecup.co.uk/tracker.php?refer='+escape(document.referrer)+'">');
//-->
This works very well but the one hitch is if someone does a search on "B&B property" it returns a $google_query of "B" ( as it picks up the "&B property" as another variable )
Any ideas or pointers to other scripts which do the same thing would be appreciated.
Thanks for looking.