学无止境

——把简单的知识用好,也把东西做的简单

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
function getip(){
    if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
        $online_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    }elseif(isset($_SERVER['HTTP_CLIENT_IP'])){
        $online_ip = $_SERVER['HTTP_CLIENT_IP'];
    }else{
        $online_ip = $_SERVER['REMOTE_ADDR'];
    }
    return $online_ip;
}

posted on 2011-05-17 21:52  JaiHo  阅读(1303)  评论(0编辑  收藏  举报