Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 19, 2022, 05:26:51 AM

Login with username, password and session length
Members
  • Total Members: 3843
  • Latest: Tricky
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 54
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 1
Guests: 48
Total: 49

Author Topic: Displays your Browser and system info  (Read 11341 times)

0 Members and 1 Guest are viewing this topic.

Offline Porky

  • Hero Member
  • *****
  • Posts: 608
  • B.A. DBA
    • Facebook!
Displays your Browser and system info
« on: January 04, 2006, 10:08:27 PM »
Both are java.html blocks.

Interntet Browser
Code: [Select]
<script>

/*Displaying a user's browser type script
*/

if (document.all)
var version=/MSIE \d+.\d+/

if (!document.all)
document.write("You are using "+navigator.appName+" "+navigator.userAgent)
else
document.write("You are using "+navigator.appName+" "+navigator.appVersion.match(version))

</script>

Operating System
Code: [Select]
<SCRIPT LANGUAGE="JavaScript">

<!--
function checkOS() {
  if(navigator.userAgent.indexOf('IRIX') != -1)
    { var OpSys = "Irix"; }
  else if((navigator.userAgent.indexOf('Win') != -1) &&
  (navigator.userAgent.indexOf('95') != -1))
    { var OpSys = "Windows95"; }
  else if(navigator.userAgent.indexOf('Win') != -1)
    { var OpSys = "Windows3.1 or NT"; }
  else if(navigator.userAgent.indexOf('Mac') != -1)
    { var OpSys = "Macintosh"; }
  else { var OpSys = "other"; }
  return OpSys;
}
// -->

</SCRIPT>

<script>
<!--
var OpSys = checkOS();
document.write(OpSys);
//-->
</script>


ontap

  • Guest
Re: Displays your Browser and system info
« Reply #1 on: January 04, 2006, 11:11:58 PM »
you could put it all into one javascript?....

Code: [Select]
<script Language="JavaScript">

/* Displays A User's Browser Type */

if (document.all)
var version=/MSIE \d+.\d+/

if (!document.all)
document.write("You Are Using "+navigator.appName+" "+navigator.userAgent)
else
document.write("You Are Using "+navigator.appName+" "+navigator.appVersion.match(version))

/* Displays A User's Operating System */

function checkOS() {
  if(navigator.userAgent.indexOf('IRIX') != -1)
    { var OpSys = "Irix"; }
  else if((navigator.userAgent.indexOf('Win') != -1) &&
  (navigator.userAgent.indexOf('95') != -1))
    { var OpSys = "Windows95"; }
  else if(navigator.userAgent.indexOf('Win') != -1)
    { var OpSys = "Windows3.1 or NT"; }
  else if(navigator.userAgent.indexOf('Mac') != -1)
    { var OpSys = "Macintosh"; }
  else { var OpSys = "Other"; }
  return OpSys;
}
var OpSys = checkOS();
document.write(OpSys);
</Script>
« Last Edit: January 04, 2006, 11:13:34 PM by ontap »

Offline bloc

  • Founder
  • *
  • Posts: 5229
    • Bloc
Re: Displays your Browser and system info
« Reply #2 on: January 06, 2006, 03:46:21 AM »
OS,host, IP,browser can already be drawn without javascript , even last login...something like this maybe?

Code: [Select]
global $user_info;

echo '<div class="smalltext"><b>Browser:</b> '.$_SERVER['HTTP_USER_AGENT'].'<br />';
echo '<b>IP:</b> '.$user_info['ip'].'<br />';
echo '<b>Last visit:</b> '.timeformat($user_info['last_login']).'</div>';

In a php-block of course.

[attachment deleted by admin]
« Last Edit: January 06, 2006, 03:47:53 AM by Bloc »

Mitch

  • Guest
Re: Displays your Browser and system info
« Reply #3 on: February 18, 2006, 12:15:53 PM »
Nice thanks bloc

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: Displays your Browser and system info
« Reply #4 on: February 18, 2006, 12:27:35 PM »
That was a fun thing :) Thanks Bloc and OnTap

cj morin

  • Guest
Re: Displays your Browser and system info
« Reply #5 on: April 26, 2006, 09:28:18 PM »
nice, thanks.

deadpoeticstar

  • Guest
Re: Displays your Browser and system info
« Reply #6 on: April 27, 2006, 07:12:26 AM »
where would this go? cause thats interesting and nice

cj morin

  • Guest
Re: Displays your Browser and system info
« Reply #7 on: April 27, 2006, 09:12:10 AM »

deadpoeticstar

  • Guest
Re: Displays your Browser and system info
« Reply #8 on: April 27, 2006, 09:18:48 AM »
woops...lol my bad...lol i thought it needed to be added to something

haxen

  • Guest
Re: Displays your Browser and system info
« Reply #9 on: January 10, 2007, 07:38:20 PM »
Me Likee !  :D