Commits

publicwhip  committed 6fccd4f

ereg deprecated

  • Participants
  • Parent commits f765df1

Comments (0)

Files changed (1)

File website/db.inc

 <?php
 
-# $Id: db.inc,v 1.31 2009/05/21 08:01:30 marklon Exp $
+# $Id: db.inc,v 1.32 2011/05/10 17:32:13 publicwhip Exp $
 # Database access wrapper.  Calls mysql.
 
 # The Public Whip, Copyright (C) 2003 Francis Irving and Julian Todd
 function isrobot()
 {
     $useragent = $_SERVER["HTTP_USER_AGENT"];
-    return ereg("Google|Slurp|msnbot|robot|Gigabot|Teoma|VoilaBot|searchme|ia_archiver|Crawler|MSNBOT|MLBot|Wget|Yandex", $useragent);
+    return preg_match("(Google|Slurp|msnbot|robot|Gigabot|Teoma|VoilaBot|searchme|ia_archiver|Crawler|MSNBOT|MLBot|Wget|Yandex)", $useragent);
 }