[WTB] Few lines of php script

Discussion in 'Programming' started by Ithilnet, Mar 26, 2007.

  1. #1
    Hi, I need a very little script. I'm sure a php coder could do it in 5 minutes.
    It's a simple cloaking script that needs to do this:

    IF the visitor come from [LIST OF SITES]
    THAN
    display something
    ELSE
    display something else


    For example:
    if the visitor comes from digital point serve
    <html>

    <head>
    <title>Page 1</title>
    </head>

    <body>
    --Something--
    </body>

    </html>

    Else

    <html>

    <head>
    <title>Page 2</title>
    </head>

    <body>
    --Something else--
    </body>

    </html>

    Please PM me your price.
    Cheers
    Ithilnet
     
    Ithilnet, Mar 26, 2007 IP
  2. stickycarrots

    stickycarrots Peon

    Messages:
    4,513
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I can do it for you :)
     
    stickycarrots, Mar 26, 2007 IP
  3. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    <?php
    // Sites to cloak
    $sites = array();
    $sites[] = 'digitalpoint.com';
    $sites[] = 'anothersite.net';
    $sites[] = 'onemore.site';
    
    if ( !empty($_SERVER['HTTP_REFERER']) ) {
       $referrer = str_replace('www.','',parse_url($_SERVER['HTTP_REFERER'],PHP_URL_HOST));
       if ( in_array($referrer,$sites) ) {
    ?>
    HTML page 1
    <?php
          exit;
       }
    }
    ?>
    HTML for page 2
    PHP:
     
    rodney88, Mar 26, 2007 IP
  4. aftermarket

    aftermarket Active Member

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    I just tried that code you posted rodney, but I can't get any referer cloaking scripts to work. I guess I'm just an ignorant noob. Shouldn't this code work too?

     
    aftermarket, Mar 26, 2007 IP
  5. aftermarket

    aftermarket Active Member

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Any1 care to comment?
     
    aftermarket, Mar 26, 2007 IP