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 .

No comments:

Post a Comment

GitHub repository using Git Bash command

  To add a project to a GitHub repository using Git Bash command line, you can follow these steps: Create a new repository on GitHub by logg...