Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to get the ip address of the client in php

The simplest way to collect the Client/Visitor IP address using PHP is the REMOTE_ADDR.
Pass the 'REMOTE_ADDR' in PHP $_SERVER variable. It will return the IP address of the visitor who is currently viewing the webpage.

Get the IP address of the website
<?php
echo 'User IP Address : '. $_SERVER['REMOTE_ADDR'];
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ip #address #client #php
ADD COMMENT
Topic
Name
9+1 =