Bunu sanırım ben veya diğer arkadaşlar göstermişti size;
<?php
$url = "http://localhost/deneme/api.php?domain=https://kam****.com/urunler/altinotu/satis/index.php";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
$resp = curl_exec($curl);
curl_close($curl);
$sonuc = json_decode($resp,true);
foreach($sonuc as $row)
{
$ip = $row['deger'];
// ÖRNEK KONTROL BU GERÇEKTEN BİR İP ADRESİMİ DEĞİLMİ
if (filter_var($ip, FILTER_VALIDATE_IP))
{
"$ip geçerli ip adresi! <br>";
}
else
{
"$ip <b>geçersiz</b> ip adresi! <br>";
}
}
?>
Warning: Invalid argument supplied for foreach() in C:xampphtdocsdenemeexample.php on line 9
Bu kullanımda şu hatayı alıyorum hocam.