PHP System Info. Display

For any computer related topics such as hardware, operating systems, computer problems and the like.

Moderators: HeRetiK, The inner Core

User avatar
Posts: 116
Joined: Wed Oct 29, 2008 12:08 am
Location: Underground...

PHP System Info. Display

Postby Palmer » Thu Feb 17, 2011 4:30 am

I'm sure some of the non-techies might get a little scare out of it, seeing their info. actually showing on the page... You'd be surprised but it works some times.
For example:
(No, it doesn't actually have porn or anything bad on it, FYI)

I post this in anonymous chat boards from time-to-time on pages I go to. ;D

focusing on the PHP:

Code: Select all

$hostaddress = gethostbyaddr($ip);
$browser = $_SERVER['HTTP_USER_AGENT'];
$referred = $_SERVER['HTTP_REFERER']; // a spelling mistake that stuck in php

print "<strong>Display IP address:</strong><br />";
print "$ip<br /><br />";
print "<strong>More detailed host address:</strong><br />";
print "$hostaddress<br /><br />";
print "<strong>Display browser info</strong>:<br />";
print "$browser<br /><br />";
print "<strong>Where you came from>:<br />";
if ($referred == "") {
print "Page was directly requested";
else {
print "$referred";

Return to “Computers”

Who is online

Users browsing this forum: No registered users and 2 guests