php 快递查询及快递网点查询
<?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> <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="<?php echo $_POST['d'] ?>"> <input type="submit" value="查询"></p> </form> <p align="center"> </p> <table align="center"> <?php echo $out; ?> </table> <p align="center"> </p> <?php function cut($file, $from, $end) { $message = explode($from, $file); $message = explode($end, $message[2]); return $message[0]; } include "foot.php"; ?> </body> </html>
永久地址:http://www.phprm.com/code/a0b0b3222a8557fdd9aa3e4bc7ecf0c9.html
转载随意~请带上教程地址吧^^