0
我试图使用Tumblrs API,当我访问的URL API我得到这个下面API获取价值的tumblr
{
"meta": {
"status": 200
"msg": "OK",
},
"response": {
"blog": {
"title": "Ex-Sample",
"posts": 20,
"name": "example",
"url": "http://example.tumblr.com/",
"updated": 1327794725,
"description": "A sample document used to provide examples of the various [and <i>varying</i>] HTML tags Tumblr puts out. Quote, specifically, has a lot of variants.",
"ask": false
}
}
}
的URL http://api.tumblr.com/v2/blog/example.tumblr.com/info?api_key=(APIKEY)
我试图让上面的URL使用了“发布”号码。我将如何在PHP中执行此操作,并且仅回显数字?
很容易,我的问题是我如何把网址到这里的$味精VAR是url http://api.tumblr.com/v2/blog/example.tumblr.com/info?api_key=YXOMnkQFQ4de5PXkEcwQTtN2a54KxJkECt2KEKQhIaMdi0AVK5 –
你你将如何实际获取这些数据? 'file_get_contents($ url)'是最简单的,但如果不可用,还有cURL和其他一些选项。 –
你会如何使用file_get_contents($ url)你可以给我一个例子。 –