1The simplest way to collect the Client/Visitor IP address using PHP is the REMOTE_ADDR.
2Pass the 'REMOTE_ADDR' in PHP $_SERVER variable. It will return the IP address of the visitor who is currently viewing the webpage.
3
4Get the IP address of the website
5<?php
6echo 'User IP Address : '. $_SERVER['REMOTE_ADDR'];
7?>
8
9/*
10I Hope it will help you.
11Namaste
12Stay Home Stay Safe
13*/