note 78304 added to reserved.variables

From: Date: Fri, 05 Oct 2007 20:30:13 +0000
Subject: note 78304 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-131151@lists.php.net to get a copy of this message
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 ( ---- Server IP: 69.147.83.197 Probable Submitter: 41.234.30.19 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- https://master.php.net/note/edit/78304 Del: integrated -- https://master.php.net/note/delete/78304/integrated Del: useless -- https://master.php.net/note/delete/78304/useless Del: bad code -- https://master.php.net/note/delete/78304/bad+code Del: spam -- https://master.php.net/note/delete/78304/spam Del: non-english -- https://master.php.net/note/delete/78304/non-english Del: in docs -- https://master.php.net/note/delete/78304/in+docs Del: other reasons-- https://master.php.net/note/delete/78304 Reject -- https://master.php.net/note/reject/78304 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131151) next »