I'm getting ip using this php code
$ip="";
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else if(!empty($_SERVER['HTTP_FORWARDED_FOR']))
{
$ip=$_SERVER['HTTP_FORWARDED_FOR'];
}
else if(!empty($_SERVER['HTTP_FORWARDED']))
{
$ip=$_SERVER['HTTP_FORWARDED'];
}
else if(!empty($_SERVER['REMOTE_ADDR']))
{
$ip=$_SERVER['REMOTE_ADDR'];
}
else
{
$ip="Unknown";
}
but on some system i'm not getting any ip,
Any suggestion Thanks
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3EklAaH
via IFTTT
Aucun commentaire:
Enregistrer un commentaire