note 78304 deleted from reserved.variables by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 18:28:12 +0000 |
| Subject: | note 78304 deleted from reserved.variables by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134370@lists.php.net to get a copy of this message | ||
Note Submitter: Error Code
----
An easy coding, but usefull
<?
$agent = $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER['REMOTE_ADDR'];
$port = $_SERVER['REMOTE_PORT'];
$d = date ('dS \of F Y h:1:s A');
echo "Your IP : $ip<br>";
echo "You are using : $agent<br>";
echo "You are connected thruogh port : $port<br>";
echo "Today is : $d";
$fp = fopen("data", "a");
fwrite($fp, "\n");
fwrite($fp, "\n");
fwrite($fp, "\n");
fwrite($fp, "Your IP : $ip");
fwrite($fp, "\n");
fwrite($fp, "You are using : $agent");
fwrite($fp, "\n");
fwrite($fp, "You are connected thruogh port : $port");
fwrite($fp, "\n");
fwrite($fp, "Today is : $d");
fwrite($fp, "\n");
fwrite($fp, "***********________________***********");
?>
it can show these information in your page and it saves it
you can also hide these info by removing
echo "Your IP : $ip<br>";
echo "You are using : $agent<br>";
echo "You are connected thruogh port : $port<br>";
echo "Today is : $d";
or you can change the coding and let it save the info in the database mysql_connect (