Jump to content

Erro ao mudar de host


Recommended Posts

Posted
<?php 
//Estatisticas dos browsers
if ((ereg("Nav", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Gold", $_SERVER["HTTP_USER_AGENT"])) || (ereg("X11", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Mozilla", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Netscape", $_SERVER["HTTP_USER_AGENT"])) AND (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) AND (!ereg("Konqueror", $_SERVER["HTTP_USER_AGENT"])) AND (!ereg("Yahoo", $_SERVER["HTTP_USER_AGENT"])) AND (!ereg("Firefox", $_SERVER["HTTP_USER_AGENT"]))) $browser = "Netscape";
elseif(ereg("Firefox", $_SERVER["HTTP_USER_AGENT"])) $browser = "Firefox";
elseif(ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) $browser = "MSIE";
elseif(ereg("Lynx", $_SERVER["HTTP_USER_AGENT"])) $browser = "Lynx";
elseif(ereg("Opera", $_SERVER["HTTP_USER_AGENT"])) $browser = "Opera";
elseif(ereg("WebTV", $_SERVER["HTTP_USER_AGENT"])) $browser = "WebTV";
elseif(ereg("Konqueror", $_SERVER["HTTP_USER_AGENT"])) $browser = "Konqueror";
elseif((eregi("bot", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Google", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Slurp", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Scooter", $_SERVER["HTTP_USER_AGENT"])) || (eregi("Spider", $_SERVER["HTTP_USER_AGENT"])) || (eregi("Infoseek", $_SERVER["HTTP_USER_AGENT"]))) $browser = "Bot";
else $browser = "Outro";

//Estatisticas dos Sistemas Operativos
if(ereg("Win", $_SERVER["HTTP_USER_AGENT"])) $os = "Windows";
elseif((ereg("Mac", $_SERVER["HTTP_USER_AGENT"])) || (ereg("PPC", $_SERVER["HTTP_USER_AGENT"]))) $os = "Mac";
elseif(ereg("Linux", $_SERVER["HTTP_USER_AGENT"])) $os = "Linux";
elseif(ereg("FreeBSD", $_SERVER["HTTP_USER_AGENT"])) $os = "FreeBSD";
elseif(ereg("SunOS", $_SERVER["HTTP_USER_AGENT"])) $os = "SunOS";
elseif(ereg("IRIX", $_SERVER["HTTP_USER_AGENT"])) $os = "IRIX";
elseif(ereg("BeOS", $_SERVER["HTTP_USER_AGENT"])) $os = "BeOS";
elseif(ereg("OS/2", $_SERVER["HTTP_USER_AGENT"])) $os = "OS/2";
elseif(ereg("AIX", $_SERVER["HTTP_USER_AGENT"])) $os = "AIX";
else $os = "Outro"; 

Boas malta tenho este codigo que estava a funcionar correctamente, mas agora mudei de servidor e está me a dar este erro

Deprecated: Function ereg() is deprecated in estatisticas.php on line 3

Deprecated: Function ereg() is deprecated in estatisticas.php on line 3

Deprecated: Function ereg() is deprecated in estatisticas.php on line 3

Deprecated: Function ereg() is deprecated in estatisticas.php on line 3

Deprecated: Function ereg() is deprecated in estatisticas.php on line 3

Deprecated: Function ereg() is deprecated in estatisticas.php on line 4

Deprecated: Function ereg() is deprecated in estatisticas.php on line 5

Deprecated: Function ereg() is deprecated in estatisticas.php on line 14

como posso corrigir isto?

#############

Posted

Agora aparece-se este erro:

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in estatisticas.php on line 3

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in estatisticas.php on line 3

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in estatisticas.php on line 3

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in estatisticas.php on line 3

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in estatisticas.php on line 3

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash inestatisticas.php on line 14

#############

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.