欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHP 手機(jī)歸屬地查詢 api

 更新時(shí)間:2010年02月08日 09:56:33   作者:  
PHP 手機(jī)歸屬地查詢 api,大家可以結(jié)合調(diào)用即可。
復(fù)制代碼 代碼如下:

<?php
header("Content-Type:text/html;charset=utf-8");
if (isset($_GET['number'])) {
$url = 'http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx/getMobileCodeInfo';
$number = $_GET['number'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "mobileCode={$number}&userId=");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$data = simplexml_load_string($data);
if (strpos($data, 'http://')) {
echo '手機(jī)號(hào)碼格式錯(cuò)誤!';
} else {
echo $data;
}
}
?>

<form action="mobile.php" method="get">
手機(jī)號(hào): <input type="text" name="number" /> &nbsp; <input type="submit" value="提交" />
</form>

相關(guān)文章

最新評(píng)論