I have a code that works fine in Chrome browser but refuses to work in other browsers.
I would be glad for any advice on how to make it work not only for Chrome and what could be my mistake.
<?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 '<a href="#" class="btn btn-info">Title</a>'; } } ?>
Advertisement
Answer
After a long clarification of the reasons why the code does not work, it turned out that the whole problem was in incorrect server caching.