尝试在PHP中使用snoopy类在Wikipedia中提交查询但是失败
<?php
include "Snoopy.class.php";
$snoopy = new Snoopy;
$snoopy->agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 FirePHP/0.2.1";
$snoopy->referer = "http://www.google.com/";
$url = "http://www.wikipedia.org/";
$data["search"] = "Intel";
$data["language"] = "en";
$data["go"] = "submit";
$snoopy->submit($url, $data);
echo $snoopy->results;
?>
似乎无法将查询提交给维基百科并返回错误。 上面的代码有什么问题?谢谢!
以下是来自wiki的error message