1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Show Different Content to Different Users?

Discussion in 'BlackHat Lounge' started by agag2, Nov 8, 2012.

  1. agag2

    agag2 Supreme Member

    Joined:
    Feb 17, 2009
    Messages:
    1,308
    Likes Received:
    254
    Hello

    Anyone know the code on how I could show an ENTIRE different website to different visitors depending on how they got to my website (i.e - which URL they're coming from like if they come from siteA.com/abc = 1 site if they come from siteB.com/abc = entirely different site - and if they come from siteC.com/abc = another site - etc)

    This is not for SEO purposes so I didn't post this in BH SEO.

    As a side question how would google look at this site?

    Thanks
     
  2. agag2

    agag2 Supreme Member

    Joined:
    Feb 17, 2009
    Messages:
    1,308
    Likes Received:
    254
    Anyone?....
     
  3. The Scarlet Pimp

    The Scarlet Pimp Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 2, 2008
    Messages:
    788
    Likes Received:
    3,129
    Occupation:
    Chair moistener.
    Location:
    Cyberspace
    php can do that easily. i have a script on my page that sends people away if they come from certain sites.

    Code:
    $refer = $_SERVER[HTTP_REFERER];
    
    if (stristr($refer,google) == TRUE) 
    {
    header("Location: http://www.whereever.com");
    exit;
    }
    
    elseif (stristr($refer,yahoo) == TRUE) 
    {
    header("Location: http://www.elsewhere.com");
    exit;
    }