HTTP_REFERER: Find the referrer page with php

It's very easy to get the referrer page with php, it's just one line of code:
<?php
$URL = $_SERVER['HTTP_REFERER'];
echo $URL;
?>

$_SERVER['HTTP_REFERER'] is a php server variable that enable you to get the url of the referrer page, from where your visitor is coming.

Referer script is used for many reasons, some of them are creating web traffic statistics, or allowing only visitors from a one website to see your website.

8 comments:

Fully Help said...

Nice blog...Very useful information is providing by ur blog. Great beginning php tutorials Very clear and helpful for beginners.

karthik anu said...

I’ve been browsing on-line greater than three hours today, but I never discovered any attention-grabbing article like yours. It is beautiful worth sufficient for me. Personally, if all webmasters and bloggers made good content material as you did, the net will be a lot more helpful than ever before.
iOS Training in Chennai
Android Training in Chennai
php Training in Chennai

john stany said...


I am expecting more interesting topics from you. And this was nice content and definitely it will be useful for many people.

Android App Development Company

john stany said...

You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...
iOS App Development Company
iOS App Development Company

louis philip said...

I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

Fitness SMS
Fitness Text
Salon SMS
Salon Text
Investor Relation SMS
Investor Relation Text

louis philip said...

I am expecting more interesting topics from you. And this was nice content and definitely it will be useful for many people.
Sms marketing
Text message marketing
Fitness SMS

Garrick Co Ida said...

Great & Useful Blog. Helped me a lot.
PHP Training in Chennai
PHP Online Training India

jessica said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Texting API
Sms API
Sms marketing