The source of userdetails.php (click to demo the file) viewed 1342 times.
If I wrote this code, then it is licensed under the GPL. If someone else wrote it, then please ask them if you want to use the code.
<?php
$ss_timing_start_times = explode(' ', microtime());
?>
<?
if ($HTTP_REFERER=="")
{
$referer = "N/A";
}
else
{
$referer = "<a href=$HTTP_REFERER target=_blank>$HTTP_REFERER</a>";
}
$r_hostname = gethostbyaddr($REMOTE_ADDR);
if ($REMOTE_ADDR == "$r_hostname") {
$r_hostname = "$REMOTE_ADDR";
}
else
{
$r_hostname = "$REMOTE_ADDR / $r_hostname";
}
echo "<font face=Arial size=1><b>Your IP / host:</b> $r_hostname<br><b>Your Port No:</b> $REMOTE_PORT<br><b>Your Referer:</b> $referer<br><b>Your Browser & OS:</b> $HTTP_USER_AGENT</font>";
?>
<br><br>
<?php
$time = date("F jS Y, h:iA"); //using the date() function
echo "<font face=Arial size=1><b>Server Time:</b> $time<br><b>Server IP / name:</b> $SERVER_ADDR / $SERVER_NAME<br><b>Server Software:</b> $SERVER_SOFTWARE<br>Page made in: ";
?>
<?php
if (!isset($ss_timing_start_times)) {
}
if (!isset($ss_timing_stop_times)) {
$stop_time = explode(' ', microtime());
}
else {
$stop_time = $ss_timing_stop_times;
}
// do the big numbers first so the small ones aren't lost
$current = $stop_time[1] - $ss_timing_start_times[1];
$current += $stop_time[0] - $ss_timing_start_times[0];
echo round($current,4);
echo " secs</font>";
?>
If you want to have a look at the source code, chose a file from this list:
To colour code your own PHP paste it here: