<?php
include "config.php";
if(isset($_POST['d'])&&isset($_POST['d'])&&$_POST['d']&&$_POST['d']){
$aa=$_POST['d'];
$url = "http://61.172.202.146:800/webquery/index.asp?wen=$aa";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$out = curl_exec($ch);
$out=cut($out,'<div align="center">','<script type="text/JavaScript">');
$out = preg_replace("/(?<=href=)([^>]*)(?=>)/i","",$out);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>天天快递----快件跟踪</title>
<link href='images/Style.css' rel='stylesheet' type='text/css'>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style>
H1{FONT-size:14px;margin-top:10px;}
</style>
</head>
<body>
<DIV id="lg">
<IMG src="images/logo.gif" >
</DIV>
<div id="s">
<div id="tit">快递查询及快递网点查询</div>
<DIV id="sn">
<UL>
<LI><a href="./">EMS</a> </LI>
<LI><a href="./">圆通</a></LI>
<LI><a href="./">申通</a></LI>
<LI class="selected">天天</LI>
<LI><a href="./">中通</a></LI>
<LI><a href="./">韵达</a></LI>
<LI><a href="./">顺丰</a></LI>
<LI><a href="./">汇通</a></LI>
<LI><a href="./">亚风</a></LI>
<LI class="m"><A href="./" target="_blank">更多</A>>></LI>
</UL>
</DIV>
</DIV>
<h1>天天快递查询</h1><form action="tt.php" method="post">
<p>运单号
<input type="text" name="d" value="<? echo $_POST['d'] ?>">
<input type="submit" value="查询"></p>
</form>
<p align="center">
</p>
<table align="center">
<? echo $out; ?>
</table>
<p align="center">
</p>
<?
function cut($file,$from,$end){
$message=explode($from,$file);
$message=explode($end,$message[2]);
return $message[0];
}
include "foot.php";
?>
</body>
</html>