Ad block is installed and active. Please support us by disabling it.
HomeWednesday, April 25, 2018, 08:53:06
2

How to insert new line (IP Address) with fwrite

Tuesday, February 10, 15, 09:51:03, 3 Yaers Ago Via wain, Hits: 6056
How to insert new line (IP Address) with fwrite, Get IP address and write to file.
Example:

Code:
<?php
$ipaddress=$_SERVER["REMOTE_ADDR"];
$newline = $ipaddress."\r";
$file = "text.txt";
$fh = fopen($file, "a");
fwrite($fh,$newline."\n");
fclose($fh);
echo $newline;
?>

Sign In

Sponsor

Related

Bookmark Script

Allow your users to easily bookmark your site, by clicking on a link on the page.

PHP Form Action Self Submit

PHP form action self submit tutorial, requirement(s): PHP server

Link Generator PHP Script

This script will allow your visitors to create links online.To use the "link generator" script completely free , the "powered by" link at the bottom of the pages must stay intact.

Tell A Friend with Captcha

This form allows your visitors to suggest your site to a friend. It features an HTML email format and an admin notification email.

PHP/MySQL Bookmarklet - PHP Tutorial

PHP/MySQL bookmarklet, bookmark current page, PHP/MySQL tutorial.

Email Link

HTML email link example

How to set up password for phpMyAdmin in Wamp Server

Password for phpMyAdmin in Wamp

Upload Attachment - PHP Tutorial

Upload attachment with PHP example, Requirement(s): PHP server

PHP Form Validation

PHP form validation :: PHP tutorial, requirement(s): PHP Server

HTML Button Generator

This script will allow your visitors to create HTML Buttons online. To use the "html button generator" script completely free , the "powered by" link at the bottom of the pages must stay intact.
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Sun, Mar 18, 18
So far has created 115 entries.
wain
This author has not yet filled in any details.