websiteye instagram gönderileri çekme
Allah rızası için YARDIM
https://www.youtube.com/watch?v=1vuaw45Don8&t=448s
şu videodaki kodları birebir yazıyorum. Dün gece kodlar gayet güzel çalıştı fakat daha sonra çalışmamaya başladı. Kafayı yemek üzereyim. Ekranda şu çıktıları alıyorum
Warning: Trying to access array offset on value of type null in C:xampphtdocsdenemedeneme.php on line 29
Warning: Trying to access array offset on value of type null in C:xampphtdocsdenemedeneme.php on line 29
Warning: Trying to access array offset on value of type null in C:xampphtdocsdenemedeneme.php on line 29
Warning: Trying to access array offset on value of type null in C:xampphtdocsdenemedeneme.php on line 29
Warning: foreach() argument must be of type array|object, null given in C:xampphtdocsdenemedeneme.php on line 29
Yardımcı olabilecek var mı?
<?php
/*
$ch = curl_init();
curl_setopt_array($ch,[
CURLOPT_URL => 'https://www.instagram.com/derdakaraaslan_/',
CURLOPT_RETURNTRANSFER => true
]);
$output = curl_exec($ch);
curl_close($ch);
preg_match_all('/"display_url":"(.*?)"/', $output, $images);
*/
$json = file_get_contents('https://www.instagram.com/derdakaraaslan_/?__a=1');
$data = json_decode($json, true);
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<ul>
<?php foreach($data['graphql']['user']['edge_owner_to_timeline_media']['edges'] as $image): ?>
<li>
<a href="#">
<img src="<?=$image['node']['display_url']?>">
</a>
</li>
<?php endforeach; ?>
</ul>
</body>
</html>
Soru hatalı mı? 👎
Eğer sorunun kurallara aykırı olduğunu düşünüyorsanız lütfen bize bildirin!