hi,
in foreach loop some times $result getting error and stoping the loop. i want to resume loop and record the error message…
i use try catch but its not resuming the loop.
what is wrong or how can i do this?
foreach ($uyeler as $uye){
$acc = $uye['access_token'];
$uid = $uye['uid'];
try {
$context = stream_context_create($opts);
$result = file_get_contents("https://graph.facebook.com/".$uid."/feed?access_token=".$acc, false, $context);
}
catch (Exception $e) {
$hata = new Hatalar();
$hata->uid = $uid;
$hata->message = $e->getMessage();
$hata->save();
}
}