自家开发了个应用,放到Google Play 的应用市场上,想从商店直接下载到本地安装,网上找了个网站提供这种功能,基于这个网站自己写了个程序自动提取apk包。
$id = 'com.duowan.owbox';
$apkName = 'Overanalyze for Overwatch';
$url = "https://apkpure.com/{$apkName}/{$id}/download?from=details";
$html = file_get_contents($url);
$preg = '<a id="download_link".*?href="(.*?)">';
preg_match("/($preg)/", $html, $downloadLink);
$link = $downloadLink[2];
file_put_contents('aaa.apk', file_get_contents($link));
本文介绍了一种通过编写程序从Google Play商店自动提取指定应用程序的APK文件的方法。该程序利用了一个提供下载链接的第三方网站,并使用PHP脚本实现。

被折叠的 条评论
为什么被折叠?



