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.
<?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: