Code:
// get response
try
{
$client = \XF::app()->http()->client();
$response = $client->get($imglink);
}
catch (\GuzzleHttp\Exception\RequestException $e)
{
\XF::logException($e, false, "Error: ");
continue;
}
Most times this code works find efor me, but sometimes i get errors like this:
<b>Fatal error</b>: Allowed memory size of 268435456 bytes exhausted (tried to allocate 232787968 bytes)
268435456 <= allowed
232787968 <= needed
allowed > needed - i have no idea what to do.