您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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;