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

Block direct traffic

Discussion in 'Black Hat SEO' started by Panique, Nov 28, 2008.

  1. Panique

    Panique Power Member

    Joined:
    Sep 21, 2008
    Messages:
    589
    Likes Received:
    412
    Location:
    Caribbean Islands
    Home Page:
    Got some questions hope that someone could help me with this!

    1] Is there a way that I could block/redirect traffic that type in my URL directly into the browser?
    2] Is there a way that I can only allow traffic that comes from a specific refferer in this case Gmail?


    Thanks in advance!
     
  2. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    Yes it can be done..by using the basic DMR

    This will block your direct traffic:
    Code:
    <?php
    
    $referer = $_SERVER['HTTP_REFERER'];
    
    if($referer == "") 
    
    {
    
    }
    
    else
    
    {
    
    echo "<meta http-equiv="refresh" content="0;url=http://example.com/"/>";
    
    
    }
    
    ?>
    
    In the Echo statement: there must be a BACKSLASH before every double quote (") so put it in
    Code:
    <meta http-equiv=BACKSLASH"refreshBACKSLASH" content=BACKSLASH"0;url=http://example.com/BACKSLASH"/>
    
     
    • Thanks Thanks x 1
  3. Panique

    Panique Power Member

    Joined:
    Sep 21, 2008
    Messages:
    589
    Likes Received:
    412
    Location:
    Caribbean Islands
    Home Page:
    Thank you very much will test this and let you know :)

    Do you also got the answer on question 2?
     
  4. Tom__

    Tom__ Junior Member

    Joined:
    Nov 9, 2008
    Messages:
    134
    Likes Received:
    300
    I think this is called the camouflage technique.
     
  5. Panique

    Panique Power Member

    Joined:
    Sep 21, 2008
    Messages:
    589
    Likes Received:
    412
    Location:
    Caribbean Islands
    Home Page:
    It doesn't work?

    Code:
    <?php
    
    $referer = $_SERVER['HTTP_REFERER'];
    
    if($referer == "") 
    
    {
    
    }
    
    else
    
    {
    
    echo "<meta http-equiv=/"refresh/" content=/"0;url=http://example.com//"/>";
    
    
    }
    
    ?>
    I get a blank page
     
  6. Jimmy_James

    Jimmy_James Newbie

    Joined:
    Nov 18, 2008
    Messages:
    39
    Likes Received:
    24
    Occupation:
    Retired Crazy Billionaire
    Location:
    New Hampshire
    Home Page:
    You have to put whatever content you want to show below the code that was supplied. Did you want the guy to build you a site too?
     
  7. Panique

    Panique Power Member

    Joined:
    Sep 21, 2008
    Messages:
    589
    Likes Received:
    412
    Location:
    Caribbean Islands
    Home Page:
    Please dont respond to increase your posts, I have content, just showing the PHP.
     
  8. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    your not using backslashes... your using just a slash try it again with a backslah lol and change the http://www.example.com to http://www.google.com or soemthing
     
  9. Panique

    Panique Power Member

    Joined:
    Sep 21, 2008
    Messages:
    589
    Likes Received:
    412
    Location:
    Caribbean Islands
    Home Page:
    Ok now I got the site working but I doesn't block direct traffic

    Code:
    <?php
    
    $referer = $_SERVER['HTTP_REFERER'];
    
    if($referer == "") 
    
    {
    
    }
    
    else
    
    {
    
    echo "<meta http-equiv="refresh" content="0;url=http://www.google.com"/>";
    // also tried url=www.google.com
    
    
    }
    
    ?>
    
     
  10. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    As for two yes it can be done...however, the referrer has to be the same EVERY SINGLE TIME.. gmail might not work b/c the referrer is different everytime - based on what im getting from you your takling about referrers from links in peoples emails?

    take the script above and instead of the

    Code:
    if($referer == "GMAIL.com") 
    
    change that to gmail and play around with it
     
  11. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    Direct Traffic = Blank Traffic

    Code:
    if($referer == "") 
    
    so this section detects the referrer...whcih is nothing..aka blank aka direct traffic..aka type in traffic

    It should work lol
     
  12. Panique

    Panique Power Member

    Joined:
    Sep 21, 2008
    Messages:
    589
    Likes Received:
    412
    Location:
    Caribbean Islands
    Home Page:
    Sent you a PM with the site, thanks for all your help! :)
     
  13. Jimmy_James

    Jimmy_James Newbie

    Joined:
    Nov 18, 2008
    Messages:
    39
    Likes Received:
    24
    Occupation:
    Retired Crazy Billionaire
    Location:
    New Hampshire
    Home Page:
    You want to suck my what? I answered your question, don't act like a little bitch.

     
  14. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    hahah he actually did tell you what to do.. lol