tags:

views:

39

answers:

2

Hi all, Im using single sign on solutions from jahrain. basically, i want to detect users coming from (facebook, yahoo, google, myspace, live/hotmail, openid) domains. then if not logged in. redirect to a webpage intended for these visitors. im using php.

+1  A: 

While this is not foolproof, a common way to do this is by examining the $_SERVER['HTTP_REFERER'] environment variable, which is generally sent by the browser as a header.

That said, note the things from this thread: http://stackoverflow.com/questions/165975/determining-referer-in-php

rascher
+1  A: 

Look at $_SERVER['HTTP_REFERER'].

This is an optional HTTP header the client may or may not set, so it's not guaranteed to be correct, trustworthy or to be there at all, but it's your only choice.

deceze