我想在php脚本中调用aspx页面。并希望从该aspx返回值到PHP。 我这样做了,但没有回复任何东西 myphp.php
<?php $url = "http://xxx.co/aa/Default.aspx" ;
$param = "?" . "Field1=" . $num . "&Field2=" . $name . ";
header('Location: ' . $url . $param);
$_COOKIE['name'];
$cookies = getCookies();
$sessionname = $cookies['name'];
echo 'name is' .$sessionname;
?>
Myasp.aspx
Session("Session_ASPUserID") = (Request.QueryString("Field1"));
Session("Session_ASPUserName") = (Request.QueryString("Field2"));
HttpCookie cookie = new HttpCookie("name");
cookie.Secure = true;
cookie.Value = "Joe";
Response.Redirect("myphp.php");
请帮助纠正这个想法
答案 0 :(得分:0)
获取文件内容并分配给变量,如。
$data = file_get_contents($url . $param);
然后检查您的所需结果是否以
的形式返回if(strpos($data,'looking_for')>=0){
//code if found what you are looking for
}else{
//code if NOT found what you are looking for
}