这是我用来获取没有API的hashtag图像的代码.我不想使用任何凭证.无需添加client_id
或访问令牌.但我只得到15张图片.我怎样才能获得所有图像?
<div>
<form action='#' method='post'>
<input type='input' name='txttag' />
<input type='submit' value='Get Image' />
</form>
</div>
<?php
function scrape_insta_hash($tag) {
$insta_source = file_get_contents('https://www.instagram.com/explore/tags/'.$tag.'/'); // instagrame tag url
$shards = explode('window._sharedData = ', $insta_source);
$insta_json = explode(';</script>', $shards[1]);
$insta_array = json_decode($insta_json[0], TRUE);
return $insta_array; // this return a lot things print it and see what else you need
}
if(isset($_POST['txttag']))
{
$tag =$_POST['txttag']; // tag for which ou want images
$results_array = scrape_insta_hash($tag);
$limit = 15; // provide the …
Run Code Online (Sandbox Code Playgroud) Apple在iOS 9.3中引入了MKLocalSearchCompleter和MKLocalSearchCompletion.我正在努力实现它.它变为两步过程1)输入部分术语 - >生成完整的搜索文本.2)用户选择其中一个来搜索实际位置.
问题是,如果我搜索200个townsend,它会给我一个位置列表,但它会被应用程序视为建议.我们如何识别它是MKMampItem还是建议?