Reputation: 465
I have this part of a program:
$refferer = ( isset($_SERVER['HTTP_REFERER'])
&& ($_SERVER['HTTP_REFERER'] != ""))
? $_SERVER['HTTP_REFERER'] : "Unknown";
to get info on people visiting my site. But I would like to know if I can extract more information from the referer? For example if someone is connecting to my website through a facebook link I get the referer as http://www.facebook.com/l.php?u=http%3A%2F%2Fmypage.net%2Ftest.php&h=PAQHD6FDUAQGrvZ32aZTbU9b... Is there a possibility to get the facebook user name as well ?
Upvotes: 0
Views: 1750
Reputation: 43816
The referrer of l.php is specifically there to prevent sites from scraping private user data via analysis of the referrer headers. There should be no way around this.
Upvotes: 1
Reputation: 28906
No, you cannot extract user information from the referring URL. You may wish to consider using Facebook's Open Graph to collect user information.
With Open Graph, you can add social plugins to your site, create Facebook applications, and interact with your users via the Facebook API.
Upvotes: 1
Reputation: 3092
No, it isn't possible. If you want to access information from Facebook, you need to register your application on Facebook and use their OAuth 2.0 API.
Upvotes: 1