国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 帝國(guó)Empire > 正文

帝國(guó)cms分類信息電話號(hào)碼查詢

2024-08-28 12:26:56
字體:
供稿:網(wǎng)友

[fwxx]歸屬地[/fwxx]

fwxx段名

<?php
/**
sooden
2007-10-2
**/
header("Content-type: text/html;charset=gbk");
/*
構(gòu)建函數(shù)
*/
//讀取電話號(hào)碼文件
function readfiletext ($file, $id)
{
$myaddress='';
$fp = @file("$file");
//循環(huán)比對(duì)
for ($i=0; $i<count($fp); $i++)
{
$readfile=explode('||',$fp[$i]);
$file1=$readfile['0'];
$file2=$readfile['1'];
$id==$file1?$myaddress=$file2:'';
}
return $myaddress;
}
//寫文件
function writefiletext ($file, $string)
{
$string = stripslashes ($string);
$fp = @fopen ($file, 'a+');
@fwrite ($fp, $string);
@fclose ($fp);
}
//匹配函數(shù)
function Cut($FileStr,$StartStr,$EndStr,$Type)
{
if(ereg($StartStr,$FileStr)&&ereg($EndStr,$FileStr))
{
if($Type==0){
$GetContent = substr($FileStr,0-(strlen($FileStr)-(strpos($FileStr,$StartStr)+strlen($StartStr))));
$GetContent = substr($GetContent,0,strpos($GetContent,$EndStr));
return $GetContent;
}else{
$GetContent = substr($FileStr,0-(strlen($FileStr)-(strpos($FileStr,$StartStr))));
$GetContent = substr($GetContent,0,strpos($GetContent,$EndStr)+strlen($EndStr));
return $GetContent;
}
}else{
return "";
}
}
/*
函數(shù)構(gòu)建結(jié)束
*/
$id=$_GET['id']; //ID
$file = 'phone.txt'; //設(shè)定電話文件地址
//如果ID為空退出
if(empty($id))
{
exit();
}
else
{
//查詢文件內(nèi)是否有地址
$myaddress=readfiletext($file,$id);

if ($myaddress) { $showadd=$myaddress; }
else {
//獲得號(hào)碼地址頁面
$show=file_get_contents("http://www.123cha.com/ip/?q=$id"); //手機(jī)號(hào)碼段
//寫入文件
@$dh=Cut($show,'您的查詢:&nbsp;',"n</li><li>",0);
if(!$dh) {
@$dh=Cut($show,'您的查詢:&nbsp;','&nbsp;</li><li>',0); }
$dh = trim(ereg_replace("rn","",$dh));
$dh =nl2br(preg_replace('/[ ]+/',' ',$dh));
$showadd=$dh;
$dh=$id.'||'.$dh.'||'."rn";
writefiletext ($file,$dh); }
}

?>
<span><a href="#clos" onclick="ShowTel();" />X關(guān)閉</a></span>&nbsp;&nbsp;<font color=red>查詢結(jié)果</font>
<div id=cresult>
<ul>
<?php
if ($showadd) {
print_r(str_replace("查詢太頻繁,暫時(shí)禁用", "無", "$showadd")); //$showadd);
}
else {
echo "<li>服務(wù)器忙,請(qǐng)稍后再試……"; }
?>
</li>
</ul>
</div>

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 南川市| 永泰县| 平定县| 丹棱县| 隆回县| 巧家县| 福海县| 郑州市| 巴塘县| 民勤县| 达州市| 富民县| 库车县| 安国市| 景东| 珠海市| 砚山县| 黎城县| 且末县| 舒城县| 岚皋县| 永城市| 喀什市| 许昌市| 治多县| 盖州市| 广元市| 满洲里市| 合山市| 阿勒泰市| 玉山县| 甘孜| 县级市| 琼结县| 天等县| 道真| 高台县| 双城市| 西平县| 普安县| 辽宁省|