summaryrefslogtreecommitdiff
path: root/it_browser.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_browser.class')
-rw-r--r--it_browser.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it_browser.class b/it_browser.class
index f46df92..d2d2673 100644
--- a/it_browser.class
+++ b/it_browser.class
@@ -62,7 +62,7 @@ function it_browser()
/* $this->UserAgent = "Mozilla/4.0 [de] (compatible; MSIE 5.0; Windows 95; .NET CRL 2.0.154)"; */
/* Find "Mozilla/4.0" */
- if (ereg("([^/]*)/([^ ]*)", $this->UserAgent, $regs))
+ if (preg_match("#([^/]*)/([^ ]*)#", $this->UserAgent, $regs))
{
$this->Type = $regs[1];
$this->Version = (double)$regs[2];
@@ -74,7 +74,7 @@ function it_browser()
$optattr = preg_split("/;\s+/", $regs[1]);
if ($optattr[0] == "compatible")
{
- if (ereg("([^/]*)[/ ]([^/]*)", $optattr[1], $regs))
+ if (preg_match("#([^/]*)[/ ]([^/]*)#", $optattr[1], $regs))
{
$this->Type = $regs[1];
$this->Version = (double)$regs[2];
@@ -99,7 +99,7 @@ function it_browser()
}
/* Find optional "[de]" */
- if (!$this->Language && ereg("\[(.*)\]", $this->UserAgent, $regs))
+ if (!$this->Language && preg_match("/\[(.*)\]/", $this->UserAgent, $regs))
$this->Language = $regs[1];
/* Check for Safari/KHTML */