How to remove Deprecated: Function eregi() to preg_match

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
me.prosenjeet
 
 
Posts: 1245
Joined: Mon Dec 24, 2007 1:50 pm
Location: Lucknow
Contact:

How to remove Deprecated: Function eregi() to preg_match

Post by me.prosenjeet » Sun Oct 30, 2016 3:29 am

How to remove Deprecated: Function eregi() to preg_match in the following lines?

Code: Select all

if (eregi('gigablast', $_SERVER['HTTP_USER_AGENT']))
{
	count_bot('gigablast');
} 
else if (eregi('googlebot', $_SERVER['HTTP_USER_AGENT']))
{
	count_bot('google');
} 
else if (eregi('yahoo! slurp', $_SERVER['HTTP_USER_AGENT']))
{
	count_bot('yahoo');
} 
else if (eregi('msnbot', $_SERVER['HTTP_USER_AGENT']))
{
	count_bot('msn');
} 
else if (eregi('seekbot', $_SERVER['HTTP_USER_AGENT']))
{
	count_bot('seekbot');
} 
else if (eregi('twiceler', $_SERVER['HTTP_USER_AGENT']))
{
	count_bot('twiceler');
} 
else if (eregi('cazoodle', $_SERVER['HTTP_USER_AGENT']))
{
	count_bot('cazoodle');
} 
else if ((eregi('robot', $_SERVER['HTTP_USER_AGENT'])) OR
	 (eregi('feedfetcher', $_SERVER['HTTP_USER_AGENT'])) OR
	 (eregi('crawl', $_SERVER['HTTP_USER_AGENT'])) OR
	 (eregi('bot-', $_SERVER['HTTP_USER_AGENT'])) OR
	 (eregi('bot/', $_SERVER['HTTP_USER_AGENT'])))

User avatar
Pablo
 
Posts: 13065
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: How to remove Deprecated: Function eregi() to preg_match

Post by Pablo » Sun Oct 30, 2016 7:45 am

This looks like custom code. So you will need to change the code where you have inserted it.

Post Reply

Who is online

Users browsing this forum: alex4orly and 3 guests