The source of ip_monitor.php (click to demo the file) viewed 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
/////////////////////////////////////////////////////
// IP Monitor v1.0 - sebflipper Copyright 2006 //
// http://www.sebflipper.com //
// //
// This is a simple script to monitor your //
// computers or servers IP address if it's dynamic //
/////////////////////////////////////////////////////
$ip_info = "IP: ".$_SERVER[REMOTE_ADDR]." - Date: ".date("d/m/y h:i a");
$refresh = "3600";
$ip_file = fopen("ip.txt", "w");
fputs($ip_file, $ip_info);
fclose($ip_file);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>IP Monitor</title>
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: small;
}
-->
</style>
</head>
<?php echo $ip_info; ?> - Refreshing in: <layer id="LayerCountDown">LayerCountDown</div> seconds
<script>
<!--
var countdownfrom=<?php echo $refresh; ?>
var currentsecond=countdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
var days = Math.floor(currentsecond/86400)
var hours = Math.floor(currentsecond%86400/3600)
var mins = Math.floor(currentsecond%3600/60)
var secs = currentsecond%60
document.getElementById('LayerCountDown').innerHTML = days+" days "+hours +":"+mins+":"+secs;
}
else{
window.location="<?php echo $_SERVER[PHP_SELF];?>"
return
}
setTimeout("countredirect()",1000)
}
countredirect()
//-->
</script>
</body>
</html>
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: