<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_65990"> <div class="blockcode"> <div id="code_WME"><ol> <li>function getRealIpAddr()</li> <li> </li> <li>{</li> <li> if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet</li> <li> {</li> <li> $ip=$_SERVER['HTTP_CLIENT_IP'];</li> <li> }</li> <li> elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy</li> <li> {</li> <li> $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];</li> <li> }</li> <li> else</li> <li> {</li> <li> $ip=$_SERVER['REMOTE_ADDR'];</li> <li> }</li> <li> return $ip;</li> <li>}</li> </ol></div> <em onclick="copycode($('code_WME'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> PHP</div> <div id="comment_65990" class="cm"> </div> <div id="post_rate_div_65990"></div> <br><br>