Guest User

Untitled

a guest
Jun 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?php
  2.  
  3. // check to see whether a cookie has been set - if it doesn't exist, create one and log it as a unique visit
  4. if (!isset($_COOKIE['track']))
  5. {
  6. // do your database stuff here
  7. setcookie('track', 'IP or something as the value'); // set timeout and domain
  8. }
  9.  
  10. ?>
Add Comment
Please, Sign In to add comment