Distro sniff »  Show posts from    to     

Icy Phoenix


Old Customizations - Distro sniff



z3d0 [ Thu 30 Aug, 2007 14:19 ]
Post subject: Distro sniff
IP detects all the linux distributions as "Linux", with this mod it will show which distro you're using :mricy:

OPEN includes/functions_mg_http.php

FIND

Code: [Hide] [Select]
elseif (strstr($http_user_agent_str, 'Linux'))
{
$user_os_ver = 'Linux';
$user_os_img .= 'linux.png';
}


REPLACE WITH

Code: [Hide] [Select]
elseif (strstr($http_user_agent_str, 'Linux'))
{
if (strstr($http_user_agent_str, 'Slackware'))
{
$user_os_ver = 'Slackware Linux';
$user_os_img .= 'slackware.png';
}
elseif (strstr($http_user_agent_str, 'Mandrake'))
{
$user_os_ver = 'Mandrake Linux';
$user_os_img .= 'mandrake.png';
}
elseif (strstr($http_user_agent_str, 'SuSE'))
{
$user_os_ver = 'SuSE Linux';
$user_os_img .= 'suse.png';
}
elseif (strstr($http_user_agent_str, 'Novell'))
{
$user_os_ver = 'Novell Linux';
$user_os_img .= 'novell.png';
}
elseif (strstr($http_user_agent_str, 'Ubuntu'))
{
$user_os_ver = 'Ubuntu Linux';
$user_os_img .= 'ubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Kubuntu'))
{
$user_os_ver = 'Kubuntu Linux';
$user_os_img .= 'kubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Xubuntu'))
{
$user_os_ver = 'Xubuntu Linux';
$user_os_img .= 'xubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Edubuntu'))
{
$user_os_ver = 'Edubuntu Linux';
$user_os_img .= 'edubuntu.png';
}
elseif (strstr($http_user_agent_str, 'Debian'))
{
$user_os_ver = 'Debian Linux';
$user_os_img .= 'debian.png';
}
elseif (strstr($http_user_agent_str, 'Red Hat'))
{
$user_os_ver = 'Red Hat Linux';
$user_os_img .= 'redhat.png';
}
elseif (strstr($http_user_agent_str, 'Gentoo'))
{
$user_os_ver = 'Gentoo Linux';
$user_os_img .= 'gentoo.png';
}
elseif (strstr($http_user_agent_str, 'Fedora'))
{
$user_os_ver = 'Fedora Linux';
$user_os_img .= 'fedora.png';
}
else
{
$user_os_ver = 'Linux';
$user_os_img .= 'linux.png';
}
}


buldo [ Fri 31 Aug, 2007 14:23 ]
Post subject: Re: Distro sniff
Thanks z3do! :up:


Mighty Gorgon [ Sun 02 Sep, 2007 10:33 ]
Post subject: Re: Distro sniff
Modified a bit and added.

Thanks.


NBG [ Sun 30 Dec, 2007 22:25 ]
Post subject: Re: Distro Sniff
where i have to put the images?????

EDIT:

is in:

/images/http_agents/os


Mighty Gorgon [ Thu 03 Jan, 2008 00:33 ]
Post subject: Re: Distro sniff
You don't need this if you are using build 022 or above.




Powered by Icy Phoenix