Support Forums
Find Ur Keywords On Google... - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Webmaster Support (https://www.supportforums.net/forumdisplay.php?fid=36)
+---- Forum: SEO, Marketing, and Website Promotion (https://www.supportforums.net/forumdisplay.php?fid=38)
+---- Thread: Find Ur Keywords On Google... (/showthread.php?tid=25452)



Find Ur Keywords On Google... - hostwitter - 03-04-2012

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


RE: Find Ur Keywords On Google... - D3xus - 03-04-2012

Seems pretty nifty but I don't know....
500 posts Big Grin


RE: Find Ur Keywords On Google... - BreShiE - 03-04-2012

Seems quite good, but can you provide a bit more information on what this does.


RE: Find Ur Keywords On Google... - hostwitter - 03-05-2012

Its Refer The user using the search string..


RE: Find Ur Keywords On Google... - ven0m - 03-05-2012

Thanks a lot for the share.
I will give it a try.