Need someone to create a cookie for me

Discussion in 'Programming' started by Andiz, Mar 18, 2008.

  1. #1
    Hi there,

    I need someone to create a cookie for a new ad on my website.

    What I want:
    A cookie that makes sure that my visitors only see the ad the first time they visit the website. The second time they won't see the ad because of the cookie.

    This should be an easy job for someone who knows how to do it.

    I will pay via Paypal.

    Send me a private message if you are interested. :)
     
    Andiz, Mar 18, 2008 IP
  2. milanmk

    milanmk Well-Known Member

    Messages:
    115
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    PM sent with details.
     
    milanmk, Mar 18, 2008 IP
  3. Andiz

    Andiz Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Milanmk got the job :)
     
    Andiz, Mar 18, 2008 IP
  4. swordbeta

    swordbeta Banned

    Messages:
    225
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    If he isn't able to do it, add me on msn: michael[at]dwproductions[dot]info
     
    swordbeta, Mar 18, 2008 IP
  5. J.T.D.

    J.T.D. Peon

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    
    <?php
    
    $ad_code = 'INSERT ADCODE HERE';
    
    if ( !isset($_COOKIE['seen_ad']) ) {
      setcookie('seen_ad', true, time()+31104000); /* 1 Year */
      echo $ad_code;
    }
    ?>
    
    PHP:
    Simple...

    - JTD

    EDIT: More "helpful" version (Has tons of comments!)

    
    <?php
    
    $ad_code = 'INSERT ADCODE HERE'; /* <-- There you put the advertisement code. Just make sure if it has any " ' " you change it to " \' ". */
    
    if ( !isset($_COOKIE['seen_ad']) ) { /* Checks if the cookie "seen_ad" is set. The code below is if it's not found. */
      setcookie('seen_ad', true, time()+31104000); /* Sets cookie for seeing the ad for 1 Year */
      echo $ad_code; /* Shows the ad! */
    }
    ?>
    
    PHP:
     
    J.T.D., Mar 18, 2008 IP
  6. milanmk

    milanmk Well-Known Member

    Messages:
    115
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    Job completed.
     
    milanmk, Mar 20, 2008 IP