[英]Error 99 - permission denied in last.fm php API call
I'm making a call to retrieve a user's latest tracks using the last.fm PHP api library. 我正在调用使用last.fm PHP api库检索用户的最新曲目。 It works perfectly when I run it on my local webserver (localhost), but when I run it on a remote server it sends back an error code of 99, saying that permission has been denied. 当我在我的本地网络服务器(localhost)上运行它时,它工作得很好,但是当我在远程服务器上运行它时,它会发回99的错误代码,说该权限已被拒绝。
Here is my code: 这是我的代码:
static function readRecentTracks() {
$authVars['apiKey'] = '#########';
$auth = new lastfmApiAuth('setsession', $authVars);
$apiClass = new lastfmApi();
$packageClass = $apiClass->getPackage($auth, 'user');
$method_vars = array(
'user' => 'liquidus219',
'limit' => 25
);
if ($tracks = $packageClass->getRecentTracks($method_vars)) {
echo json_encode($tracks);
} else {
echo '<b>Error '.$packageClass->error['code'].' - </b><i>'.$packageClass->error['desc'].'</i>';
}
}
You can see the code in action at http://liquidus219.freehostia.com/api/?q=readRecentTracks 您可以在http://liquidus219.freehostia.com/api/?q=readRecentTracks上查看代码。
UPDATE: I have checked/changed the application URL to no effect. 更新:我已检查/更改了应用程序URL无效。
UPDATE: I have gone through the code for the last.fm PHP api, no sign of an error 99 defined anywhere. 更新:我已经完成了last.fm PHP api的代码,没有在任何地方定义错误99的迹象。
我最终发现我的托管服务提供商阻止了这个电话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.