<?php
if($_get[mode]) {
$mode = $_get[mode];
$url = $_get[url];
$ip = $_server[remote_addr];
$fp = fopen("msg.txt","a+");
fputs($fp,"$ip ".date("y-m-d h:i:s")." $mode $url\n");
fclose($fp);
exit;
}
?>
<body onunload="msg('off')" onload="msg('on')">
<span id="view" style="visibility:hidden"></span>
</body>
<script>
function msg(v) {
view.innerhtml = '<iframe src="msg.php?mode='+v+'&url='+location.href+'"></iframe>';
}
</script>