Skip to content

Instantly share code, notes, and snippets.

View zeeshanmuhammad's full-sized avatar

Zeeshan Muhammad zeeshanmuhammad

View GitHub Profile
<script>
jQuery.ajax({
url: 'http://api.ipstack.com/check?format=0&fields=country_code&access_key=YOUR_API_ACCESS_KEY',
type: 'GET',
dataType: 'jsonp',
success: function(location) {
if (country_code === 'ID') {
window.location.href = '//www.google.com';
}
}