HomeSunday, June 24, 2018, 01:41:03
2

How to insert new line (IP Address) with fwrite

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

Email to Friend - PHP Script

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

Creating a Math CAPTCHA with PHP - PHP Tutorial

This tutorial will show you how to create a form with Math Captcha.

Sitemap

phpForm.net Website Sitemap

PHP Write to File

PHP Write to File :: PHP Tutorial, requirement(s): PHP server

Preg_Match - PHP Email Validation

Validate email with preg_match in php

PHP filesize

The filesize function returns the size of the specified file.

Filter Words in PHP - PHP Tutorial

Filter bad words in PHP, requirement(s): PHP server

PHP $_GET Function

Get function in PHP

E-Cards 1.1. PHP Script

This script will allow your visitors to send e-cards to their friends. It features admin notification and HTML output.To use the "e-cards" script completely free , the "powered by" link at the bottom of the pages must stay intact.

PHP Mail

Sends an email.
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.