我过去常常解析windowphonee.com网站页面以获取有关某些应用程序的信息。今天我注意到微软已经停止访问网站-我收到HTML:
<div class="content-container"><fieldset><h2>Your request appears to be from an automated process.</h2>
<h3>If this is incorrect, notify us by <a href="/static/redir.aspx">clicking here</a> to be redirected.</h3>
</div>
有没有人知道正确的方式在web应用程序(PHP)获取有关应用程序(特别是它的图标)的信息,基于应用程序ID?
你试过这个API了吗?这只是为了搜索,但你可以通过应用名称搜索,然后根据应用ID过滤结果。
请求示例:http://marketplaceedgeservice.windowsphone.com/v8/catalog/apps?os=8.0.10521.0&cc=CZ〈en-US&chunkSize=50&q=Pock8
我发现,这也工作和检索网页内容:
$agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
$ch3 = curl_init();
curl_setopt($ch3, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch3, CURLOPT_URL, $url);
curl_setopt($ch3, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch3, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch3, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch3, CURLOPT_VERBOSE, true);
curl_setopt($ch3, CURLOPT_USERAGENT, $agent);
是否来自您的WP应用程序?如果是这样,您可以简单地使用Marketplace detail task
来启动商店或市场。
跟着这个:
http://msdn.microsoft.com/en-us/library/windows/apps/hh394017 (v = vs.105) . aspx
希望有帮助!