How to display visitors referring domain?

maineyak

Power Member
Joined
Mar 27, 2008
Messages
602
Reaction score
560
I use the below code to display what site the visitor is coming from:

Code:
<?php
echo $_SERVER['HTTP_REFERER'];

?>

Is there a way to display JUST the visiting domain, and not the webpage itself they came from?
 
Can you manipulate the string??

I know nothing about PHP, but find the first / after the . and take everything up until there.
 
Some years ago I had a nice little bit of code that displayed the 'location' of the visitor ie the town the isp was in. I have tried to find the code again but cant.

Can anyone help me with some code that takes the ip and then throws the location up on the page the code is placed into????

So I can use it to 'personalize the visitors page ala... Hi John Listen I know your from around (TOWN / LOCATION) but you can still bla bla bla

Madeezy..
 
Back
Top