WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

How to obtain the IP address of a visitor to my website?

Koji

New member

0

0%

Status

Offline

Posts

42

Likes

0

Rep

0

Bits

220

3

Months of Service

0%
Very easy:
This is the PHP code:

<?php
// Get the user's IP address
$userIp = $_SERVER['REMOTE_ADDR'];
// Print the IP address on the page
echo "Your IP address is: " . $userIp;
?>
 

249

6,622

6,642

Top