Re: [geoplugin] geoplugin_countryCode undefined in IE after recent Update

342 views
Skip to first unread message

geoPlugin Support

unread,
Sep 28, 2012, 1:30:07 PM9/28/12
to geop...@googlegroups.com
Hi Jesse,

Please use the regular javascript web service and this will not be an issue:

<script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>

Unfortunately, too many people have been relying on the SSL web service to serve non-SSL web pages, which are more "expensive" (in terms of CPU/load) calls than the regular web service. Thus, we have had to make the SSL service available to only users that financially contribute to the service. 

Regards

On Sep 28, 2012, at 7:21 PM, Jesse Taylor wrote:

Hi,

I've been using geoPlugin for about a year with great result.  We are redirecting our Canadian clients to our .ca domain.

We detect the country then cookie the users response, but only when they acknowledge the notification box.  I don't think we're exceeding our requests.

index.php
<html>
<head>
<?php require_once(DIR_SYSTEM . 'geoPlugin/geoplugin.php');?>
</head>

geoplugin.php
<?php
if(isset($_COOKIE['geoClose']) && $_COOKIE['geoClose']=='true'){
} else { ?>
<!-- Start GeoPlugin -->
<script src="https://ssl.geoplugin.net/javascript.gp" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var country = geoplugin_countryCode();
if(country === 'CA'){
$('#notification').html('<div class="attention" style="display: none;">We\'ve detected that you\'re visiting us from Canada.</div>');
$('.attention').fadeIn('slow');
$('html, body').animate({ scrollTop: 0 }, 'slow');
}else if(country != 'US'){
$('#notification').html('<div class="attention" style="display: none;">We\'ve detected that you\'re visiting us from outside the US.</div>');
$('.attention').fadeIn('slow');
$('html, body').animate({ scrollTop: 0 }, 'slow');
}else{
//nothing stupid IE
}
});
$('.geoClose').live('click', function() {
console.log('geoplugin notify closed');
document.cookie = 'geoClose=true;'
});
</script>
<!-- End GeoPlugin -->
<?php
}
?>


Thanks

Jesse

--
You received this message because you are subscribed to the Google Groups "geoPlugin" group.
To view this discussion on the web visit https://groups.google.com/d/msg/geoplugin/-/pHHymYbqSY0J.
To post to this group, send email to geop...@googlegroups.com.
To unsubscribe from this group, send email to geoplugin+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/geoplugin?hl=en.

Jesse Taylor

unread,
Sep 28, 2012, 1:54:31 PM9/28/12
to geop...@googlegroups.com
Works good... is there any major concerns over non-SSL requests for my users?

Thanks
Jesse

geoPlugin Support

unread,
Sep 28, 2012, 2:00:19 PM9/28/12
to geop...@googlegroups.com
Absolutely none. We don't collect or store any information and all geoPlugin servers are non-shared and private, so there are absolutely no privacy concerns from using geoPlugin, SSL or not.
To view this discussion on the web visit https://groups.google.com/d/msg/geoplugin/-/pLzKAtS-DrYJ.
Message has been deleted

Bitsum Technologies

unread,
Oct 11, 2012, 4:15:25 PM10/11/12
to geop...@googlegroups.com
Hi,

Sorry to butt in, but why are you using Javascript here? I assume there is rationale for this that I don't see on the page. 

If there is NOT a reason for using Javascript, then you should switch to the PHP version of geoPlugin. It will be more stable, robust, and fast. SSL is also readily available for PHP callbacks.

Jeremy Collake


Bitsum LLC. USA.



On Wed, Oct 10, 2012 at 10:28 AM, <yaro...@gmail.com> wrote:
Ok, so how do we "financially contribute to the service"?
 
   Yaron
To view this discussion on the web visit https://groups.google.com/d/msg/geoplugin/-/OTpEfiICOV8J.

geoPlugin Support

unread,
Oct 11, 2012, 5:06:53 PM10/11/12
to geop...@googlegroups.com
via the PayPal donate button on http://www.geoplugin.com

As Jeremy says, if you don't need SSL, don't use it - the SSL javascript will not pass referrer causing problems and the SSL webservice is not load balanced across the 3 web servers. only web1 is holding the SSL cert at the moment and not the load balancer. So the SSL service is currently more prone to outages. 
We see *far* too many uses of non-SSL http://xxxxxxxx pages making calls to https://ssl.geoplugin.net/javascript.gp and this is purely unnecessary. 

Best
Andy

On Oct 10, 2012, at 4:28 PM, yaro...@gmail.com wrote:

Ok, so how do we "financially contribute to the service"?
 
   Yaron

On Friday, September 28, 2012 7:30:14 PM UTC+2, geoPlugin Support wrote:
To view this discussion on the web visit https://groups.google.com/d/msg/geoplugin/-/OTpEfiICOV8J.

Bitsum Technologies

unread,
Oct 11, 2012, 5:12:52 PM10/11/12
to geop...@googlegroups.com
Hi,

I actually was questioning why he was using geoPlugin Javascript instead of geoPlugin PHP, but it is good to know the differences between an SSL and plaintext callback on your web server's load balancing.

Jeremy Collake


Bitsum LLC. USA.



Reply all
Reply to author
Forward
0 new messages