Monday, November 24, 2014

IP store in a File

keep IP  from visitors and place them on a file.


<?php
$file = fopen("ip.txt","a");
$ip=$_SERVER['REMOTE_ADDR'];
echo fwrite($file,$ip);
fclose($file);
?> 
this store in a file as name ip.txt
("ip.txt","a"); 
the second parameter can use "w" if you want only write mode 
"a" stands for append mode .

1 comment:

  1. My friend Suggest me this blog and I can say this is the best blog to get the basic knowledge.Thank you so much for this Selenium Training in Chennai

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...