Ad block is installed and active. Please support us by disabling it.
HomeSunday, November 19, 2017, 14:11:00
2

How to insert new line (IP Address) with fwrite

Tuesday, February 10, 15, 09:51:03, 3 Yaers Ago Via wain, Hits: 3126
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

Contact Us 2.0. with HTML Page and Pop Up Frame

This is the same Contact Us 2.0. that is in this forum, But I have added more options to this script and a html page with a very nice pop Up frame that DONT get block by any pop Up software. Many websites use this type of script to bypass the blocking…

ShoutBox 1.1. PHP Script

ShoutBox allows your users to post short messages on your site. The script is lightweight and very easy to install and use.

PHP getdate

Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given.

How to set up password for phpMyAdmin in Wamp Server

Password for phpMyAdmin in Wamp

Jquery PHP Contact Form

This script allows your visitors to send you an email directly from your website.

Imageline

Draws a line between the two given points.

PHP form with file upload

Advanced Contact Form with email and form field validation. It allows your visitors to send you an email directly from your website.

Sending HTML Email With Images - PHP Tutorial

Sending HTML Email With Images - Upload Image with PHP - Creating Dynamic Webpages Using PHP and MySQL - Select, Delete, Update..

MySQL Basic Functions

MySQL Basic Functions - select, delete, update..

GuestBook PHP Script

Allow visitors to leave messages on your site. It features easy install, admin notification, and control panel to remove unwanted entries.
About Author

wain

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