【发布时间】:2012-08-17 10:11:58
【问题描述】:
http://api-public.addthis.com/url/shares.json?url=http://google.com
我需要以 php 字符串的形式获取共享数量。 (回声)
有什么简单的方法吗?
【问题讨论】:
-
json_decode()就是你要找的东西 -
这是给你的一个班轮
echo array_shift(json_decode(file_get_contents("http://api-public.addthis.com/url/shares.json?url=http://google.com"), true));