本文整理汇总了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;
}
}