Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 900 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PHP]Get OS and Browser

#1
Operating System Function:
PHP Code:
function GetOS() {
    
$oses = array (    'iPhone' => '(iPhone)',    'Windows 3.11' => 'Win16','Windows 95' => '(Windows 95)|(Win95)|(Windows_95)','Windows 98' => '(Windows 98)|(Win98)',
        
'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)','Windows XP' => '(Windows NT 5.1)|(Windows XP)','Windows 2003' => '(Windows NT 5.2)',
        
'Windows Vista' => '(Windows NT 6.0)|(Windows Vista)','Windows 7' => '(Windows NT 6.1)|(Windows 7)','Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
        
'Windows ME' => 'Windows ME','Open BSD'=>'OpenBSD','Sun OS'=>'SunOS','Linux'=>'(Linux)|(X11)','Safari' => '(Safari)',
                
'Macintosh'=>'(Mac_PowerPC)|(Macintosh)','QNX'=>'QNX','BeOS'=>'BeOS','OS/2'=>'OS/2',
        
'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)');
    foreach(
$oses as $os=>$pattern){if(eregi($pattern$_SERVER['HTTP_USER_AGENT'])) {return $os;} } return 'Unknown'


Usage:
PHP Code:
<?php echo "Your Current OS is".GetOS(); ?>






Browser Function:
PHP Code:
function GetBrowser() {
    
$browsers = array('Opera' => 'Opera','Mozilla Firefox'=> '(Firebird)|(Firefox)','Galeon' => 'Galeon','Mozilla'=>'Gecko','MyIE'=>'MyIE',
    
'Lynx' => 'Lynx','Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)',
    
'Konqueror'=>'Konqueror','SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)',
    
'Internet Explorer 8' => '(MSIE 8\.[0-9]+)','Internet Explorer 7' => '(MSIE 7\.[0-9]+)','Internet Explorer 6' => '(MSIE 6\.[0-9]+)',
    
'Internet Explorer 5' => '(MSIE 5\.[0-9]+)','Internet Explorer 4' => '(MSIE 4\.[0-9]+)');
    
    foreach(
$browsers as $browser=>$pattern) { if(eregi($pattern$_SERVER['HTTP_USER_AGENT'])) {return $browser; } } return 'Unknown';


Usage:
PHP Code:
<?php echo "Your Browser is ".GetBrowser(); ?>

Credits to a guy i really don't remember
Reply

#2
Operating System Function:
PHP Code:
function GetOS() {
    
$oses = array (    'iPhone' => '(iPhone)',    'Windows 3.11' => 'Win16','Windows 95' => '(Windows 95)|(Win95)|(Windows_95)','Windows 98' => '(Windows 98)|(Win98)',
        
'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)','Windows XP' => '(Windows NT 5.1)|(Windows XP)','Windows 2003' => '(Windows NT 5.2)',
        
'Windows Vista' => '(Windows NT 6.0)|(Windows Vista)','Windows 7' => '(Windows NT 6.1)|(Windows 7)','Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
        
'Windows ME' => 'Windows ME','Open BSD'=>'OpenBSD','Sun OS'=>'SunOS','Linux'=>'(Linux)|(X11)','Safari' => '(Safari)',
                
'Macintosh'=>'(Mac_PowerPC)|(Macintosh)','QNX'=>'QNX','BeOS'=>'BeOS','OS/2'=>'OS/2',
        
'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)');
    foreach(
$oses as $os=>$pattern){if(eregi($pattern$_SERVER['HTTP_USER_AGENT'])) {return $os;} } return 'Unknown'


Usage:
PHP Code:
<?php echo "Your Current OS is".GetOS(); ?>






Browser Function:
PHP Code:
function GetBrowser() {
    
$browsers = array('Opera' => 'Opera','Mozilla Firefox'=> '(Firebird)|(Firefox)','Galeon' => 'Galeon','Mozilla'=>'Gecko','MyIE'=>'MyIE',
    
'Lynx' => 'Lynx','Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)',
    
'Konqueror'=>'Konqueror','SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)',
    
'Internet Explorer 8' => '(MSIE 8\.[0-9]+)','Internet Explorer 7' => '(MSIE 7\.[0-9]+)','Internet Explorer 6' => '(MSIE 6\.[0-9]+)',
    
'Internet Explorer 5' => '(MSIE 5\.[0-9]+)','Internet Explorer 4' => '(MSIE 4\.[0-9]+)');
    
    foreach(
$browsers as $browser=>$pattern) { if(eregi($pattern$_SERVER['HTTP_USER_AGENT'])) {return $browser; } } return 'Unknown';


Usage:
PHP Code:
<?php echo "Your Browser is ".GetBrowser(); ?>

Credits to a guy i really don't remember
Reply

#3
lol, thanks dude, but change the colours, i can hardly read it D:
Reply

#4
lol, thanks dude, but change the colours, i can hardly read it D:
Reply

#5
sorry its [php] tag i can't do anything
Reply

#6
sorry its [php] tag i can't do anything
Reply

#7
Bleh

ill blame sage then ;P
Reply

#8
Bleh

ill blame sage then ;P
Reply

#9
Wow thanks, I didn't know those tips !
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through