Support Forums

Full Version: Find Ur Keywords On Google...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
<?php
$referer= $_SERVER['HTTP_REFERER'];



//find the search query from google that brought them here

$qref= strpos($referer,’google’);



if($qref!=”){

$qstart = strpos($referer,’q=’);

$qend = strpos($referer,’&’,$qstart);

$qtext= substr($referer,$qstart+2,$qend-$qstart-2);

$qtext= str_replace(‘+’,’ ‘,$qtext);

}

echo $qtext

?>


Notes:if someone reaches your site via google it will show the keyword that the user has typed in google
Seems pretty nifty but I don't know....
500 posts Big Grin
Seems quite good, but can you provide a bit more information on what this does.
Its Refer The user using the search string..
Thanks a lot for the share.
I will give it a try.