Skip to content

Instantly share code, notes, and snippets.

@joshtronic
Created April 17, 2013 16:20
Show Gist options
  • Save joshtronic/5405627 to your computer and use it in GitHub Desktop.
Save joshtronic/5405627 to your computer and use it in GitHub Desktop.
<?php
if (isset($_SERVER['HTTP_USER_AGENT'])
&& !String::isEmpty($_SERVER['HTTP_USER_AGENT'])
&& !preg_match('/(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg)/i', $_SERVER['HTTP_USER_AGENT']))
{
exit('EOF');
session_start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment