Need a PHP script that will accomplish the detailed requirements below. This should be a very simple script for an experienced coder.
REQUIREMENT 1
This script will need to capture the following data from any vistor to the page the script will be installed on.
* Referring URL of visitor.
* IP address of visitor
* Search query if any (parsed from referring URL if the referring URL is from google, yahoo, or bing)
Example: If someone does a search on [login to view URL] for "red wigets", I would want to know that the referrer was Google, I would want the IP of the visitor, and I would need to know that "red wigets" was the term that was searched for.
REQUIREMENT 2
The 3 data points above will need to be stored in a variable that would display in the following format if that variable was echoed: Google, [login to view URL], red wigets
ADDITIONAL DETAILS: If the referring URL is from google, yahoo, or bing, I would just want Google, Yahoo, or Bing to display in the variable discussed in Requirement 2 above. If the referring URL was any other referrer, I would want the full referring URL to be captured and displayed in the variable in Requirement 2 above.
For example: If someone comes to the page the script is installed on from [login to view URL], then I would want the variable from Requirement 2 above to display in the following format when echoed:
[login to view URL], [login to view URL]
My budget for a simple PHP script like this one is $25-$50.