canadabeeau Posted January 3, 2010 Share Posted January 3, 2010 CMS like Joomla allow the administrator to see the keywords which get people to their website the most. How can I do this for my site? Is this done using PHP and google? or some other method. Thank you for help in advance Quote Link to comment https://forums.phpfreaks.com/topic/187005-search-words/ Share on other sites More sharing options...
justAnoob Posted January 3, 2010 Share Posted January 3, 2010 This is kinda what I'm looking for on the page with my pagination script http://www.mysite.com/category.php?selecting=Video Games?page=63 WRONG POST, SORRY. Quote Link to comment https://forums.phpfreaks.com/topic/187005-search-words/#findComment-987535 Share on other sites More sharing options...
The Little Guy Posted January 3, 2010 Share Posted January 3, 2010 You could do something like this (I'm not sure if this is what your talking about though): list($server, $keywords) = explode('?', $_SERVER['HTTP_REFERER']); $keywords = explode('&', $keywords); foreach($keywords as $words){ list($key, $phrase) = explode('=', $words); if($key == 'q'){ echo urldecode($phrase); break; } } Quote Link to comment https://forums.phpfreaks.com/topic/187005-search-words/#findComment-987541 Share on other sites More sharing options...
ignace Posted January 3, 2010 Share Posted January 3, 2010 You can use parse_url to retrieve the url query $query = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY); Either way you'd have to check if there was a query: if ($query) { //or if ($keywords) { Quote Link to comment https://forums.phpfreaks.com/topic/187005-search-words/#findComment-987613 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.