简体   繁体   English

从http://jsonip.appspot.com/?callback=? 在JavaScript中

[英]over quota error while getting ip address from the http://jsonip.appspot.com/?callback=? in javascript

I am trying to get the user's IP address. 我正在尝试获取用户的IP地址。 For this i am using the below code: 为此,我使用下面的代码:

  var jqxhr = $.getJSON("http://jsonip.appspot.com?callback=?",
                    function (data) { 
                        alert(data.ip);        
                    })
        .error(function () { alert("error"); })

At start i was able to get the IP but now it is not. 一开始我能够获得IP,但现在却没有。 Its giving 它给

Over Quota. 超过配额。 This application is temporarily over its serving quota. 该应用暂时超出了其服务配额。 Please try again later 请稍后再试

Please help me how can get rid of this or please suggest me some other option that can helpful to fetch IP by using jquery or javascript. 请帮助我如何摆脱这种情况,或者建议我一些其他选项,可以通过使用jquery或javascript帮助获取IP。

The solution you're using here is to use someone else's free lookup service via JSONP. 您在此处使用的解决方案是通过JSONP使用其他人的免费查找服务。 However, with free service you get no guarantees on uptime or performance. 但是,使用免费服务无法保证正常运行时间或性能。 This is something that someone cooked up, and is not actively maintaining at this time. 这是某人做的事情,目前还没有积极维护。

The code is run on presumably google's free app, which has a quota system. 该代码可能在google的免费应用程序上运行,该应用程序具有配额系统。 Although the quota is fairly generous (5 million pageviews / month) it seems that it's exceeded its allotment. 尽管配额是相当慷慨的(每月5百万次页面访问),但似乎已超出配额。 See https://developers.google.com/appengine/kb/general#quota for a more detailed explanation. 有关更多详细说明,请参见https://developers.google.com/appengine/kb/general#quota

Your permanent solution shouldn't rely on free services. 您的永久解决方案不应依赖免费服务。

Having said that, this should work for you: http://jsonip.com?callback=? 话虽如此,这应该适合您: http://jsonip.com?callback=? : http://jsonip.com?callback=?

That service is limited to IPV4, but beggars can't be choosers, I suppose. 我想该服务仅限于IPV4,但乞g不能成为选择者。 Writeup: https://news.ycombinator.com/item?id=2278874 撰写: https ://news.ycombinator.com/item id = 2278874

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从javascript网页获取设备ip地址时出现问题 - issue in getting device ip address from a javascript webpage 从IP地址获取地理位置 - Getting geolocation from IP address 用Javascript获取瘦客户端的虚拟IP地址 - Getting virtual IP address of thin client in Javascript 可以在Google App Engine上使用Ajax作为来自nonappspot.com域的https登录用户吗? - Can one use Ajax on Google App Engine as a logged in user over https from a non-appspot.com domain? 从javascript发送http请求时,获取500:内部服务器错误作为来自Web服务器的响应 - Getting 500: Internal Server Error as a response from webserver while sending http request from javascript 从javascript获取所有uid时出错 - Error while getting all the uid from javascript 从javascript进行http调用时出现故障 - Getting failure while making http call from javascript 从javascript中的字符串中提取ip地址和端口 - Extract ip address and port from a string in javascript 我可以使用 Javascript 将 http 请求发送到特定的 IP 地址吗? - Can I use Javascript to send http request to a specific IP address? 使用JavaScript获取IP地址是否与通过PHP获取IP地址一样准确? - Is getting an IP address with JavaScript as accurate as getting it through PHP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM