I would like to slightly change the content of a page if a user came from a search engine, as opposed to an email/blog/forum/etc link. How should I go about doing this? Thanks
You could try google analytics for this, but before that you have to install the code on your website check website here http://www.google.com/analytics/ hope this helped you
There's no guaranteed way to do this. You can look at the HTTP_REFERER variable but it is optionally set by browser. There could be as many as 30% of visitors who's browsers don't set the variable. If you have any control over the links on other blogs / email, etc. you could append a variable to the url, mysite.com?source=email. You could then easily look for this variable when a visitor arrives.
Strangely enough, I had a talk with a mate that wanted to do something similar to this on a larger scale. This is what I recommended: $_SERVER['HTTP_REFERRER'] is going to be your best solution for this, even though it's not completely dependable. You can create a list of popular search engine URLs by visiting a site like: http://www.thesearchenginelist.com/ Then, you parse the $_SERVER['HTTP_REFERRER'] to get the hostname out of it. From here, compare the hostname to the hostname from the search engine list that you have. If it's in the list of hostnames, show the changed content.