Back in 2010 or so when I was looking for work. I wanted to track when recipients were looking at my portfolio, so I added some code to alert me whenever the page was loaded, by anyone.
It seems more innocent than sinister to me now. Note how I had to alter it to filter out web spiders:
$spiders = array( 'Baiduspider', 'msnbot', 'youdao', 'YandexBot', 'YodaoBot', 'KaloogaBot', 'googlebot', 'majestic12', );
And I also had to filter out friends and family I sent the page to to get their feedback, and me when I was at their places.
It’s no longer working code because PHP has added changes to eliminate global variables that are not scoped to the $_SERVER
variable. But it’s a fun time capsule.