Mega Code Archive

 
Categories / Php / HTML
 

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.";  }  ?>