You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

clientip.php 228B

123456789
  1. <?php
  2. $client_ip = '';
  3. if (isset($_SERVER['X_HTTP_FORWARDED_FOR'])) {
  4. $client_ip = $_SERVER['X_HTTP_FORWARDED_FOR'];
  5. } else if (isset($_SERVER['REMOTE_ADDR'])) {
  6. $client_ip = $_SERVER['REMOTE_ADDR'];
  7. }
  8. echo $client_ip;