草庐IT

API-AADSTS

全部标签

php - Google Geocoding API 为我的服务器和网络浏览器提供不同的结果

这个问题在这里已经有了答案:GoogleMapsWebsiteandAPI:differentresults(1个回答)关闭9年前。我正在使用GoogleGeocodingAPI获取我网站上不同位置搜索的纬度/经度坐标。问题是,对于伦敦地区(它可能不仅限于我们大多数用户群所在的伦敦),例如“滑铁卢”,地理编码api向我的服务器返回不同的结果,这与我将url直接放入我的浏览器。这是为滑铁卢生成的url:http://maps.googleapis.com/maps/api/geocode/xml?address=waterloo,%20london,%20england&bounds=4

php - 保护对 PHP API 的访问

我有一个iPhone应用程序在服务器上使用我的phpapi,但如果有人知道url,它目前是打开的。我想确保没有人可以使用这个API,直到我准备好将它变成一个公共(public)API(如果我这样做的话)我已阅读thisarticle但我不确定他们说的是什么意思:[CLIENT]BeforemakingtheRESTAPIcall,combineabunchofuniquedatatogether(thisistypicallyalltheparametersandvaluesyouintendonsending,itisthe“data”argumentinthecodesnippet

php - Twitter 搜索 API,如何通过@username 进行过滤?

我正在使用TwitterAPI原子格式http://search.twitter.com/search.atom?lang=en&q=some_hashtag但它会返回我来自所有人的带有标签“some_hashtag”的推文。我正在寻找一些过滤器来搜索所有带有主题标签“some_hashtag”的推文,仅来自一个用户,例如@this_one。我在“twittergetsearch”文档中没有找到这个参数 最佳答案 你必须给q一个额外的参数:from:。例如,检索@VictimCommunity的标签some_hashtag的推文:h

php - 讨论 API : create comment as guest

我正在尝试使用DisqusAPI将帖子添加到现有的讨论/论坛。在文档中我可以读到我可以作为访客发送评论而无需身份验证。文档是这样说的:http://disqus.com/api/docs/posts/create/Anonymouscommentsareallowedundertwoconditions:You'reusinglegacyauth,andyoursecretkeyYou'reusingyourpublickey,you'vecomefromaverifiedreferrer,you'reunauthenticated,andtheforumyou'reattemptin

php - 使用 CodeIgniter CSRF 保护为 Web 应用程序创建 API

我有一个使用CodeIgniter2构建的Web应用程序,我在其中启用了CSRF保护。$config['csrf_protection']=TRUE;我的friend正在为此创建移动应用程序,因此他需要API来与Web应用程序通信。我使用thistutorial在CI中创建了RESTfulAPI.移动应用发出的所有请求都是POST请求。我面临的问题是,由于启用了CSRF保护,并且从移动设备发出的POST请求不携带任何“CSRFtoken”,因此它抛出500内部服务器错误。但是,如果我禁用CSRF保护,一切都工作正常。实现它的正确方法是什么?我应该在移动设备上生成token吗?或者我应该

php - Youtube Analytics API 人口统计维度 "gender"显示在分析仪表板上,但在 API Explorer 上给出的查询无效

我目前正在使用YoutubeAnalyticsAPI,到目前为止,我已经能够提取youtube必须提供的所有数据,除了查询每次都失败的性别/年龄组维度,docs指向播放位置的示例,而不是它本身的人口统计。我正在使用PHPClientLibrary,==PHP==$analytics_gender=newGoogle_YouTubeAnalyticsService($client);$optparam=array('dimensions'=>'gender');$metrics="views";$analytics_demo_gender=$analytics_gender->repor

php - 如何在 Laravel 4 RESTful API 中实现多对多关系

我想实现类似于thisquestion中要求的东西在Laravel4中,一个player/资源可以有多个team/,反之亦然。在理想情况下我可以查询球员/1/球队然后像这样取回一些JSON:{player:{id:1,name:'Bob',sport:'Curling',teams:[{id:1,name:'NorthernCurlingSoc.',age:2},{id:2,name:'SouthernCurlingSoc.',age:4}]}或teams/{id}/players并获取相关项。显然,如果我使用的是Laravel的View,我可以简单地调用$player->teams一

php - 如何使用 PHP 提取 API 数据并将其添加到数据库中?

我希望从CrunchBaseAPI中提取公司列表的数据,然后将该数据添加到数据库中的选定表中。我真的不知道从哪里开始。我一直在关注cURL。我现在所在的位置:$url="http://api.crunchbase.com/v/1/company/audible-coffee.js?api_key=API_KEY&callback=?";$data=get_data($url);//Note:ideallyyoushoulduseDOMmanipulationtoinjectthe//taginsidethesection$data=str_replace("","",$data);ec

php - 如何处理电子邮件已存在mailchimp api代码php中的错误

我有这个代码:App::import('Vendor','mailchimp',array('file'=>'mailchimp/Mailchimp.php'));$key=Configure::read("MAILCHIMP_KEY");$list_id='xxxxxxxx';$email=array('email'=>$email_id);$merge_vars=array('FNAME'=>$fname,'LNAME'=>$lname,'groupings'=>array('name'=>array('TestGroupTitle'),'groups'=>array('TestG

php - Laravel API Controller 结构?

用户api的Controller结构中哪一个有意义每个api版本的UI和API的单独Controller/app/controllers/UsersController.php/app/controllers/api/v1/ApiUsersController.php或UI和API的独立Controller并在代码中处理版本控制/app/controllers/UsersController.php/app/controllers/api/ApiUsersController.php或使用单一Controller,检测路由器内的/api/调用。根据url返回html/json。/app