if ((eregi('opera mini', $_SERVER['HTTP_USER_AGENT'])) == 1)
How can I convert this?
if ((preg_match('opera mini', $_SERVER['HTTP_USER_AGENT'])) == 1)
The above does not work.
You need to add the delimeters. I choose to use /
, others choose ~
or #
.
if ((preg_match('/opera mini/', $_SERVER['HTTP_USER_AGENT'])) == 1)