Insta

function callInstagram($url)
{
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => 2
));

$result = curl_exec($ch);
curl_close($ch);
return $result;
}

$tag = ‘teamnordictrail’;
$client_id = ”roxvret’

$url = ‘https://api.instagram.com/v1/tags/’.$tag.’/media/recent?client_id=’.$client_id;

$inst_stream = callInstagram($url);
$results = json_decode($inst_stream, true);

//Now parse through the $results array to display your results…
foreach($results[‘data’] as $item){
$image_link = $item[‘images’][‘low_resolution’][‘url’];
echo ‘‘;
}

3 reaktion på “Insta

  1. Pingback: barcelona shirt

  2. Pingback: 有趣新聞

  3. Pingback: maillot foot pas cher

Kommentera