Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <?php
  2. $rola = rand(0,1);// Sorteia 1 ou 2
  3. $cookie = $_COOKIE['Ads'];
  4.  
  5.  
  6. if($cookie == 0){ //
  7. if($rola == 1){
  8. //Se o numero do sorteio for: 1 (PEDIR CLIQUE)
  9. setcookie('Ads', '1');
  10. }else{
  11. //Se o numero do sorteio for: 0 (NÃO PEDIR CLIQUE)
  12. setcookie('Ads', '0');
  13. }
  14. }
  15.  
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement