这是他们的样本,我不知道如何让它工作。 http://aws.amazon.com/code/AWIS/402
一直显示: Usage: $argv[0] ACCESS_KEY_ID SECRET_ACCESS_KEY site\n 不工作,当你填写:
$urlInfo = new UrlInfo("myaccessKeyId", "mysecretAccessKey", "stackoverflow.com");
我该如何解决这个问题?
public function UrlInfo($accessKeyId, $secretAccessKey, $site) {
$this->accessKeyId = $accessKeyId;
$this->secretAccessKey = $secretAccessKey;
$this->site = $site;
}
/**
* Get site info from AWIS.
*/
public function getUrlInfo() {
$queryParams = $this->buildQueryParams();
$sig = $this->generateSignature($queryParams);
$url = 'http://' . self::$ServiceHost . '/?' . $queryParams .
'&Signature=' . $sig;
$ret = self::makeRequest($url);
echo "\nResults for " . $this->site .":\n\n";
self::parseResponse($ret);
}