? $ TEMP = EXPLODE (', $ part); $ browserver = $ TEMP [2]; $ browserver = preg_replace (' / ([d.] ) / ',' 1 ', $ browserver); $ browserver = $ browserver; $ browser = 'Internet Explorer';} if (! $ browser = '') {$ browseinfo = $ browser. '' $ browserver;.} else {$ browseinfo = false;} return $ browseinfo;} function getIP ( ) {global $ _SERVER; if (getenv ( 'HTTP_CLIENT_IP')) {$ ip = getenv ( 'HTTP_CLIENT_IP');} else if (getenv ( 'HTTP_X_FORWARDED_FOR')) {$ ip = getenv ( 'HTTP_X_FORWARDED_FOR');} else IF (GetENV ('remote_addr')) {$ ip = getENV ('remote_addr');} else {$ ip = $ _server ['remote_addr'];} returnid $ ip;} Function getos () {Global $ _SERVER; $ agent = $ _server ['http_user_agent']; $ os = false; if (EREGI ('WIN', $ Agent) && Strpos ($ Agent, '95')) {$ OS = 'Windows 95';} else if (EREGI ('WIN 9X', $ Agent && Strpos ($ Agent, '4.90')) {$ OS = 'Windows Me';} Else IF (EREGI ('Win ", $ agent && EREG ('98 ', $ agent)) {$ OS =' windows 98 ';} elseiff (EREGI (' WIN ', $ Agent) && EREGI (' NT 5.1 ', $ Agent) {$ OS = 'Windows XP';} else if (EREGI ('WIN', $ Agent) && EREGI ('NT 5', $ Agent) {$ OS = 'Windows 2000';} elseiff (EREGI ('Win' $ Agent && EREGI ('NT', $ Agent) {$ OS = 'Windows NT';} Else IF (EREGI ('Win', $ Agent) && EREG ('32 ', $ Agent) {$ OS = 'Windows 32';} else if (EREGI ('Linux', $ Agent) {$ OS = 'Linux';} Else IF (EREGI ('UNIX', $ Agent) {$ OS = 'UNIX' Else IF (EREGI ('Sun', $ Agent) && EREGI ('OS', $ Agent) {$ OS = 'Sunos';} Else IF (EREGI (' IBM ', $ Agent) && EREGI (' OS ', $ Agent) {$ OS =' IBM OS / 2 '; Else IF (EREGI (' Mac ', $ Agent) && EREGI (' PC ', $ Agent) {$ OS =' Macintosh ';} Else IF (EREGI (EREGI (' PowerPC ', $ Agent) {$ OS = 'PowerPC';} Else IF (EREGI ('AIX', $ Agent) {$ OS = 'AIX';} Else IF (EREGI ('HPUX', $ Agent) {$ OS = ' HPUX ';} else if (EREGI (' NetBSD ', $ Agent) {$ OS =' NetBSD ';} else if (EREGI (' BSD ', $ Agent) {$ OS =' BSD ';} else IF (EREG ('OSF1', $ Agent) {$ OS = 'OSF1';} Else IF (EREG ('Irix', $ Agent) {$ OS = 'Irix';} else if (EREGI ('FreeBSD " $ Agent)) {$ OS = 'freebsd';} else if (EREGI ('Teleport', $ Agent) {$ OS = 'Teleport';} else if (EREGI (EREGI ('Flashget', $ Agent) { $ os = 'flashget';} else if (EREGI ('Webzip', $ Agent) {$ OS = 'Webzip';} Else IF (EREGI ('Offline', $ Agent) {$ OS = 'Offline' } Else {$ os = 'unknown';} RETURN $ OS;}}?> How to use: