'PHP Code with two conditions stopped working

I am attaching the code below, which worked correctly in the morning and is now not running.

I did not make any changes, a few hours ago everything worked. I don't believe it's caching (I use Cloudflare) because PHP runs on the server, not the client.

What could be the problem? If there was an error in the code, it would simply not work, but it stopped working just a few hours ago, while the rest of the time it worked perfectly.

<?php
    $geoplugin = unserialize( file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $_SERVER['REMOTE_ADDR']) );
    if ( is_numeric($geoplugin['geoplugin_latitude']) && is_numeric($geoplugin['geoplugin_longitude']) && !is_user_logged_in() ) {
        $lat = $geoplugin['geoplugin_latitude'];
        $long = $geoplugin['geoplugin_longitude'];
        if ($geoplugin['geoplugin_countryCode'] == 'US') {
            echo do_shortcode ('[sc name="web_code"][/sc]');
        }
    }
?>
php


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source