I am trying to get the search keyword from the referrer url. I am currently using the following code for google urls. But sometimes it doesnβt work ...
$query_get = "(q|p)"; $referrer = "http://www.google.com/search?hl=en&q=learn+php+2&client=firefox"; preg_match('/[?&]'.$query_get.'=(.*?)[&]/',$referrer,$search_keyword);
Is there any other / clean / working way to do this?
Thank you Prasad
url php keyword preg-match
pnm123
source share