3
fwrite - Write new line in text file
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$ip = $ip . PHP_EOL;
$file = "text.txt";
$fh = fopen($file, 'a');
fwrite($fh, $ip);
fclose($fh);
?>
rated 3 times
(3)
(0)
comments: 0 / hits: 570
/ 12 months ago, sun, mar 8, 20, 06:58:05
More From
» PHP
Comments
There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account