php 跨域post数据并获取返回值的问题?敬请高手帮忙解决一下!感谢! 本帖最后由 lila201 于 2010-05-16 10:06:44 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这样是不行的,只能<form action="你的服务器页面读取yd.asp并显示" target="_blank" method="post" > <label>请输入韵达快递单</label> <input name="No" id="No" type="text" value="1200189335589" maxlength="13" /> <INPUT type="submit" name="button" id="button" value="查询" /></form> 估计要自己写post 请求,类似uc登录 $parameter = "No=1200189335589";$header .= "POST /yd.asp HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Type: text/html; charset=gb2312\r\n";$header .= "Content-Length: ".strlen($parameter)."\r\n\r\n";$header .= "Connection: Close\r\n";$header .= "Cache-Control: no-cache\r\n";$header .= $parameter;$fp=fsockopen("www.kd185.com",80,$errno,$errstr,15);$string="";if($fp){ fputs($fp,$header); while($result=fgets($fp)){ $string.=$result; } fclose($fp);} PHP Joomla1.5的PollXT2.0插件无法正常使用 为什么我的网站后台会有陌生人在发信息我的是dedecms 各位大侠帮忙 能告诉我蘑菇街添加商品是怎么做的吗? 一个PHP登陆注入小示例 本人急求chinaphp的邀请码 推荐一个超强的PHP表达式求值的类 一个php异或问题,求助,在线等! cron 定时任务 错误 PHP如果统计数据库里一个月或者一个礼拜的销售金额 mysql问题 制作这种企业网站,PHP的,做一个多少钱?
<form action="你的服务器页面读取yd.asp并显示" target="_blank" method="post" >
<label>请输入韵达快递单</label>
<input name="No" id="No" type="text" value="1200189335589" maxlength="13" />
<INPUT type="submit" name="button" id="button" value="查询" />
</form>
$parameter = "No=1200189335589";
$header .= "POST /yd.asp HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Type: text/html; charset=gb2312\r\n";
$header .= "Content-Length: ".strlen($parameter)."\r\n\r\n";
$header .= "Connection: Close\r\n";
$header .= "Cache-Control: no-cache\r\n";
$header .= $parameter;
$fp=fsockopen("www.kd185.com",80,$errno,$errstr,15);
$string="";
if($fp){
fputs($fp,$header);
while($result=fgets($fp)){
$string.=$result;
}
fclose($fp);
}