我正在使用 intlTelInput.min.js 使用此代码进行地理 IP 查找
I am using intlTelInput.min.js for geo IP lookup with this code
jQuery("#teephnumber").intlTelInput({
allowExtensions: true,
defaultCountry: "auto",
setNumber: "Telephone number",
geoIpLookup: function(callback) {
$.get('http://ipinfo.io', function() {}, "jsonp").always(function(resp) {
var countryCode = (resp && resp.country) ? resp.country : "";
callback(countryCode);
});
},
nationalMode: false,
utilsScript: "/wp-content/themes/imc/js/utils.js"
});
它工作正常,但现在不在控制台我看到这个错误:
it was working fine, but now not in console I see this error:
The server responded with a status of 429 (Too Many Requests), GET http://ipinfo.io/?callback=jQuery1112025137682701461017_1438183879450&_=1438183879451
因为这个工作没有javascript代码.这可能是什么原因?
And no javascript code because of this works.What can be the reason for this?
在此处查看速率限制:https://ipinfo.io/开发人员
您每天限制为 1,000 个 API 请求.如果您需要发出更多请求或需要 SSL 支持,请参阅我们的付费计划."
"You are limited to 1,000 API requests per day. If you need to make more requests, or need SSL support, see our paid plans."
我认为您需要为更多请求付费,或者想办法减少您提出的请求.您可能可以缓存该位置,因此您只需使用本地存储为每个用户查询一次.
I think you need to pay for more requests or find a way to reduce the requests you are making. You can probably cache the location so you only query once per user using localstorage.
这篇关于服务器响应状态为 429 (Too Many Requests) intlTelInput.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 Angular 2/Typescript 中使用 IScrollUse IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
Anime.js 在 Ionic 3 项目中不起作用anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 项目中不起作用)
Ionic 3 - 使用异步数据更新 ObservableIonic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用异步数据更新 Observable)
Angular 2:在本地 .json 文件中找不到文件Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指令?)
将 ViewChild 用于动态元素 - Angular 2 &离子2Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(将 ViewChild 用于动态元素 - Angular 2 amp;离子2)