v2.5.2
Giriş yap

websiteye instagram gönderileri çekme

7derbia
477 defa görüntülendi

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>
qplot
1868 gün önce

boşa uğraşma ancak localde calışır bu kodlar sitede çalışmaz facebook API kullanman gerekli