【发布时间】:2014-03-02 22:28:28
【问题描述】:
我有以下代码:
<?php
$ids = 'ids=com.hugogames.hugotrollwars';
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $ids
)
);
$context = stream_context_create($opts);
$result = file_get_contents('https://play.google.com/store/xhr/getdoc', false,
$context);
$convert = explode("\n", $result);
基本上它从 Playstore 中提取权限并将其显示为字符串。我遇到的问题是删除不需要的数据(图像链接、描述),只显示权限和权限描述。我尝试将 json_decode 函数与 php 一起使用,它返回 NULL。
我有什么遗漏吗?
非常感谢任何帮助!
【问题讨论】:
-
如果您登录到谷歌帐户,就会出现问题。它将需要使用有效的令牌。如果您注销,则不需要此要求。遗憾的是,Playstore 没有 API。所以这是全新的领域。有某种模式。我注意到 {"42656262": 出现在每个返回的应用程序上。