current ip in php returns ::1
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'];
?>
/*
I Hope it will help you.
Namaste
Stay Home Stay Safe
*/
Also in PHP:
- array reverse sequence pp
- clear laravel cace
- Date - hours php
- basic code for file upload in php
- Method Illuminate\Database\Eloquent\Collection
- array reverse phjp
- don't show php errors
- check if array contain key php
- check if key in array excist
- check if part of string php
- check datatype in php
- echo in php console log
- character count in php
- command not found: laravel
- clear cache from admin panel laravel
- crud with modal in lravel
- clear cache laravel composer
- envoyer des donnees js a php
- check key exist array php
- convert date to day of year php
- array value loop in php
- Parse error</b>: syntax error, unexpected ':', expecting ';' or '{' in <b>//twilio-php-master/src/Twilio/autoload.php</b> on line <b>61</b><br />
- clearing services cache file in laravel
- eloquent first