Jump to content

Google and Yahoo


phpretard

Recommended Posts

$_SERVER['HTTP_REFERER'] reads

 

http://www.google.com/search?q=Can+I+Pull+This+Info&rls=com.microsoft:*&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1

 

When someone hits my site from google.  Yahoo has a "p=".

 

Is it possible to capture just the "q=" and/or the "p=" value.

 

 

Link to comment
https://forums.phpfreaks.com/topic/87213-google-and-yahoo/
Share on other sites

try this...

 

<?php

$strUrl = "http://www.google.com/search?q=Can+I+Pull+This+Info&rls=com.microsoft:*&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1";

$arrUrl = parse_url($strUrl);
parse_str($arrUrl['query'],$arrParams);
print_r($arrParams);
?>

 

Link to comment
https://forums.phpfreaks.com/topic/87213-google-and-yahoo/#findComment-446097
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.