网站如何抓取用户手机号和IP地址 手机ip查询我的地址定位

这里就必要用到1个php得到手机号码和ip地点的类库!
因为源码比拟长 , 必要的或是私聊小编哦!
空话未几说 , 上源码!
class mobile{
function getPhoneNumber(){
if (isset($_SERVER[ "HTTP_X_NETWORK_INFO "])){
$str1=$_SERVER[ "HTTP_X_NETWORK_INFO "];
$getstr1=preg_replace( "/(.*,)(11[d])(,.*)/i ", "二 ",$str1);
Return $getstr1;
}elseif (isset($_SERVER[ "HTTP_X_UP_CALLING_LINE_ID "])){
$getstr二=$_SERVER[ "HTTP_X_UP_CALLING_LINE_ID "];
Return $getstr二;
}elseif (isset($_SERVER[ "HTTP_X_UP_SUBNO "])){
$str三=$_SERVER[ "HTTP_X_UP_SUBNO "];
$getstr三=preg_replace( "/(.*)(11[d])(.*)/i ", "二 ",$str三);
Return $getstr三;
}elseif (isset($_SERVER[ "DEVICEID "])){
Return $_SERVER[ "DEVICEID "];
}else{
Return false;
}
}
function getHttpHeader(){
$str=" ";
foreach ($_SERVER as $key=> $val){
$gstr=str_replace( "& ", "& ",$val);
$str.="$key -> ".$gstr. "rn ";
}
Return $str;
}
function getUA(){
if (isset($_SERVER[ "HTTP_USER_AGENT "])){
Return $_SERVER[ "HTTP_USER_AGENT "];
}else{
Return false;
}
}
function getPhoneType(){
$ua=$this-> getUA();
if($ua!=false){
$str=explode( " ",$ua);
Return $str[0];
}else{
Return false;
}
}
function isOpera(){
$uainfo=$this-> getUA();
if (preg_match( "/.*Opera.*/i ",$uainfo)){
Return true;
}else{
Return false;
}
}
function isM三gate(){
$uainfo=$this-> getUA();
if (preg_match( "/M三Gate/i ",$uainfo)){
Return true;
}else{
Return false;
}
}
function getHttpAccept(){
if (isset($_SERVER[ "HTTP_ACCEPT "])){
Return $_SERVER[ "HTTP_ACCEPT "];
}else{
Return false;
}
}
function getIP(){
$ip=getenv( "REMOTE_ADDR ");
$ip_=getenv( "HTTP_X_FORWARDED_FOR ");
if (($ip_ !=" ") && ($ip_ !="unknown ")){
$ip=$ip_;
}
return $ip;
}
}
【网站如何抓取用户手机号和IP地址 手机ip查询我的地址定位】?>