PHP/HTML/REMOTE ADDR

Материал из Web эксперт
Перейти к: навигация, поиск

Get the IP address of the current user

 
<?php 
 
$curip = $_SERVER["REMOTE_ADDR"]; 
$myarray = array (); 
if (!in_array ($curip, $myarray)){ 
    echo $curip . " is in array"; 
} else { 
    echo $curip . " is not in the database."; 
} 
?>