草庐IT

PERFORM_API_CALL

全部标签

php - 如何使用 PHP 从 iTunes Search API JSON 页面中提取值?

我正在创建一个需要最新iPhone应用程序价格的网站,例如在appshopper上,感谢stackoverflow上的gbc我被引导使用iTunes搜索API.我对PHP有点熟悉,尽管我不经常练习它,也不熟悉JSON的使用或如何从中提取值。我尝试使用这里的教程:http://webhole.net/2009/11/28/how-to-read-json-with-javascript/让它工作,虽然我没有运气,没有数据被提取而且我没有足够的技能来弄清楚它。我还尝试了许多其他教程,尽管上面的教程似乎最符合我的需要。这将是网站的必要部分,虽然它不是网站的关键组成部分,因此它不需要非常健壮,

php - AWeber API "Method requires access to Subscriber information"错误故障排除

我正在尝试使用PHPSDK从AWeber列表中检索特定订阅者。代码:$subscribers=$account->loadFromUrl("/accounts/$account->id/lists/$list_id/subscribers");var_dump($subscribers->find(array('email'=>$email)));exit;问题是,我收到以下错误:WebServiceError:MethodrequiresaccesstoSubscriberinformation.Google空手而归。 最佳答案

PHP eBay API GeteBayOfficialTime 调用返回 'Unsupported API call' 错误

我试图从eBay中提取卖家列表,但每次运行此代码时,我都会收到错误TheAPIcall"GeteBayOfficialTime"isinvalidornotsupportedinthisrelease我在装有ZendServer的Mac上运行它。PHP请求:define('XML_POST_URL','https://api.sandbox.ebay.com/ws/api.dll');$theData='MyAuthKey11Low2011-07-12T21:59:59.005Z2011-07-30T21:59:59.005ZReturnAll';$headers=array('Con

php - 私有(private) REST API

我们有RESTAPI,我们希望只有我们的域可以访问并且不发送欺骗请求。为此,我唯一想到的就是检查引荐来源$_SERVER['HTTP_REFERER']。然而docssaythat:Theaddressofthepage(ifany)whichreferredtheuseragenttothecurrentpage.Thisissetbytheuseragent.Notalluseragentswillsetthis,andsomeprovidetheabilitytomodifyHTTP_REFERERasafeature.Inshort,itcannotreallybetruste

php - call_user_method_array 函数已弃用,用什么代替它?

这个问题在这里已经有了答案:关闭9年前。PossibleDuplicate:Recommendedreplacementfordeprecatedcall_user_method?FunctioninPHPdeprecated,whatshouldIusenow?call_user_method_array函数已弃用,那么我应该使用什么来实现相同的结果?

php - 在 PHP 中通过 JSON API 获取 Youtube 订阅者数量

我想从这个JSON文件中获取订阅者计数值:http://gdata.youtube.com/feeds/api/users/googlechrome?v=2&alt=json这就是我所做的,但它不起作用。$youtube_url=json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/users/googlechrome?v=2&alt=json'),true);$youtube_data=$youtube_url['entry']['yt$statistics']['subscriberCount'];

php - Google 日历 API - (403) 访问未配置'

我开发了一个使用GoogleCalendarAPI的应用程序。当我将其从开发环境移至测试环境时,我在GoogleAPI控制台中为其创建了新条目,并将该信息复制到config.php中。//Theapplication_nameisincludedintheUser-AgentHTTPheader.'application_name'=>'GoogleCalendarPHPStarterApplication',//OAuth2Settings,youcangetthesekeysathttps://code.google.com/apis/console'oauth2_client_i

php - ftp_connect fatal error : call undefined function

出于某种原因,ftp_connect()函数不起作用,当我尝试使用它时,它以fatalerror结束,指出此函数未定义...令人惊讶的是我仍然可以使用ftp客户端或使用ftp连接通过终端。我该如何解决这个问题?我在MountainLion上运行,我有5.3php版本-我重新安装了一次,希望这能解决我的问题。 最佳答案 检查PHPFTPinstallationmanual在PHP7上,您可以通过将此行添加到php.ini文件来启用它。extension=php_ftp.dll在PHP8+上启用php.ini中的这一行:extensio

php - FOSUserBundle 和 REST Api 调用 : How to use custom FormType?

我在我的Symfony2网站上使用FOSUserBundle。现在我正在开发一个API以允许通过RESTAPI调用进行注册。我已经覆盖了FOSUserBundle的RegistrationController:ApiRegistrationController.php:/***@Route("/user/",defaults={"_format"="json"},requirements={"_method"="POST"})**/publicfunctionregisterAction(Request$request){[...]$form=$formFactory->createF

php - Gmail PHP API 发送电子邮件

我正在尝试通过GmailPHPAPI(https://developers.google.com/gmail/api/v1/reference/users/messages/send)发送电子邮件。在我发送消息之前,一切似乎都正常。我的代码是:privatefunctioncreateMessage($email){$message=newGoogle_Service_Gmail_Message();$message->setRaw(strtr(base64_encode($email),'+/=','-_,'));//$emailisarawemaildatastringreturn