SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: $_Server HTTP_REFFERER Query
-
Oct 22, 2009, 03:49 #1
- Join Date
- Dec 2005
- Posts
- 381
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
$_Server HTTP_REFFERER Query
Hi
I'm looking to do the following:
If a user has came from google I want to display a different msg to the one shown on my site if they have came from anywhere else or if they have actually typed the url in.
I know I need to do soemthing similar to the following:
Code:<?php if($_SERVER['HTTP_REFERER']!="http://www.google.co.uk"){ echo this; } ?>
As always any help much appreciated.
-
Oct 22, 2009, 03:56 #2
- Join Date
- Aug 2000
- Location
- Philadephia, PA
- Posts
- 20,578
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
http://php.net/manual/en/function.strpos.php
PHP Code:if (strpos($_SERVER['HTTP_REFERER'], 'google') !== false) {
echo "Google specific text";
}
Try Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more
-
Oct 22, 2009, 05:04 #3
- Join Date
- Dec 2005
- Posts
- 381
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Excellent. Thanks very much!
Bookmarks