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*/
1$exec = 'ipconfig | findstr /R /C:"IPv4.*"';
2exec($exec, $output);
3preg_match('/\d+\.\d+\.\d+\.\d+/', $output[0], $matches);
4print_r($matches[0]);
5