Pages: [1]   Go Down
Send this topic | Print
Author Topic: php referrer  (Read 1047 times)
tipu
Active Member
**
Offline Offline

Posts: 74


« on: November 03, 2007, 11:10:46 AM »

is it possible with php to detect the site that referred the user to the current site, i.e. if site X was found through a google search, php can detect it?
Logged
aldo
Official 110mb Guru
********
Offline Offline

Posts: 8003


SMF is ftw :D


WWW
« Reply #1 on: November 03, 2007, 11:14:20 AM »

You can use www.google-analytics.com put the code on your site and it will show you where you get refered from, such as Yahoo! Google Search and the keywords used, and other websites. It is very useful. I am sure though you could use PHP to determine that but it would be easier with a Stats tracker, Such as I said, because a PHP script that your asking about may be resource intensive Wink
Logged


Mop (Gb)
Loyal 110MB Member
*******
Offline Offline

Posts: 4364


Don't Panic!


WWW
« Reply #2 on: November 03, 2007, 11:16:41 AM »

$_SERVER[HTTP_REFERER] Contains what you seek.
Logged




Support conficker! Add dino to your sig!
aldo
Official 110mb Guru
********
Offline Offline

Posts: 8003


SMF is ftw :D


WWW
« Reply #3 on: November 03, 2007, 11:30:31 AM »

Actually $_SERVER['HTTP_REFERER'] is what you seek Wink
Logged


Mop (Gb)
Loyal 110MB Member
*******
Offline Offline

Posts: 4364


Don't Panic!


WWW
« Reply #4 on: November 03, 2007, 11:33:07 AM »

It works either way.
Logged




Support conficker! Add dino to your sig!
tipu
Active Member
**
Offline Offline

Posts: 74


« Reply #5 on: November 03, 2007, 12:43:02 PM »

holy guac! that works exactly what what i wanted lol!

thanks~
Logged
bind
just a man
Authority Member
****
Offline Offline

Posts: 901



« Reply #6 on: November 03, 2007, 04:29:44 PM »

Please note NEVER to trust the $_SERVER['HTTP_REFERRER'] return value ... it can be completely blocked and even forged in the headers from the client side. It should be used for information purposes only.
Logged

Learn the basics, create your code, then post source code to troublshoot if you have any problems

Here is all you need to learn the basics

HTML
Javascript
CSS
PHP
MySQL



.
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
*****
Offline Offline

Posts: 15860


experimental theologian


WWW
« Reply #7 on: November 03, 2007, 05:38:41 PM »

It works either way.

However, the quoted value is more standard. The unquoted value is interpreted as a definition that doesn't actually exist, so it's assumed to be a string.
Logged

Hi! I’m a signature virus! Add me to your signature to help me spread.
spam me: ispamspot@gmail.com

blog | my work @ deviantART | Imagine-ng image editor
Pages: [1]   Go Up
Send this topic | Print
Jump to: