当前位置: 首页>>代码示例>>PHP>>正文


PHP Base_Common::getLocalIP方法代码示例

本文整理汇总了PHP中Base_Common::getLocalIP方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_Common::getLocalIP方法的具体用法?PHP Base_Common::getLocalIP怎么用?PHP Base_Common::getLocalIP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base_Common的用法示例。


在下文中一共展示了Base_Common::getLocalIP方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getOperatorFromVadmin

 function getOperatorFromVadmin($OperatorName, $Detail = "")
 {
     Base_Common::getLocalIP();
     $array = array('CurrentIp' => $IP, 'OpLoginId' => $OperatorName);
     $Data = json_encode($array);
     $key = "987654321!@#\$%";
     $txt = "6" . $Data . $key;
     $sign = md5(strtoupper($txt));
     $Data = urlencode(base64_encode($Data));
     $url = "http://tradeservice.5173esb.com/CommService/CommonRequest.ashx?OperationType=6&Data={$Data}&Sign={$sign}";
     $return = file_get_contents($url);
     $return_arr = json_decode(base64_decode($return), true);
     if (is_array($return_arr)) {
         $OperatorInfo = json_decode($return_arr['JsonData'], true);
         if ($OperatorInfo['OpLoginId'] != "") {
             $Operator = array('photo' => $OperatorInfo['OpAvatar'], 'QQ' => $OperatorInfo['OPQQ'], 'mobile' => $OperatorInfo['OPMObile'], 'tel' => $OperatorInfo['OPTel'], 'weixin' => $OperatorInfo['OPWeiXin'], 'name' => $OperatorInfo['OPName'], 'cno' => $OperatorInfo['OpRealName'], 'login_name' => $OperatorInfo['OpLoginId'], 'weixinPicUrl' => $OperatorInfo['OPWeiXinPicUrl'], 'weixinPicUrl_officer' => $OperatorInfo['OPWeiXinPicUrl2'], 'xnGroupId' => $OperatorInfo['OPSmallCanUID'], 'xnGroupId_officer' => $OperatorInfo['OPSmallCanUID2'], 'photo_officer' => $OperatorInfo['OpAvatar2'], 'qq_url' => $OperatorInfo['OPQQIdKey'] == "" ? "" : 'http://sighttp.qq.com/authd?IDKEY=' . $OperatorInfo['OPQQIdKey'], 'qq_url_officer' => $OperatorInfo['OPQQIdKey2'] == "" ? "" : 'http://sighttp.qq.com/authd?IDKEY=' . $OperatorInfo['OPQQIdKey2'], 'QQ_officer' => $OperatorInfo['OPQQ2'], 'mobile_officer' => $OperatorInfo['OPMObile2'], 'tel_officer' => $OperatorInfo['OPTel2'], 'weixin_officer' => $OperatorInfo['OPWeiXin2'], 'name_officer' => $OperatorInfo['OPName2'], 'cno_officer' => $OperatorInfo['OpRealName2'], 'login_name_officer' => $OperatorInfo['OpLoginId2'], 'qq_link_type' => $OperatorInfo['IsNewPopQQ'] == 0 ? 'js' : 'http');
             //去除所需列表之外的数据
             $t = explode(",", $Detail);
             if (count($t) > 1) {
                 foreach ($Operator as $key => $value) {
                     if (!in_array($key, $t)) {
                         unset($Operator[$key]);
                     }
                 }
             }
             return $Operator;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:032404cxd,项目名称:prototype_main,代码行数:33,代码来源:Operator.php


注:本文中的Base_Common::getLocalIP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。