情况是这样的:
我有一个PhP登录页面,check是一个外部ASP页面生成的东西(昵称)。
例如:
我被记录了?因此,直接打开asp页面将显示“昵称:thecruis”等。
我没有记录?所以打开ASP页面不会显示任何内容。
现在我要用PhP页面捕捉“thecruis”字符串。
使用file_get_contents只返回“昵称:”,即asp页面的“静态”部分。
我做错什么了?
一些代码:
$aspSource = "http://www.example.com/inc/whois.asp";
$file = file_get_contents($aspSource);
$start = strpos($file, "username:") + 9;
$username = substr($file, $start);
echo "URL-> $aspSource<br>Content-> $file<br>Start-> $start<br>Username-> $username<br>END";
但结果只是
URL-> http:
Content-> username:
Start-> 9
Username->
END
提前感谢任何人都会帮忙的!