在Firefox扩展中查找IP地址 [英] IP Address Lookup in a Firefox Extension

查看:187
本文介绍了在Firefox扩展中查找IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个Firefox扩展,我需要找到当前加载的页面的IP地址。我可以用window.location.host获取页面的主机名,但有没有办法找到该主机名的IP?



我试图寻找答案Mozilla开发人员中心,但无法找到任何东西。编辑:我会用PHP这样做,但不能,因为它是一个Firefox扩展,运行在客户端只。我没有web服务器做后端PHP。 /addons.mozilla.org/en-US/firefox/addon/590rel =nofollow noreferrer> ShowIP Firefox扩展模块就可以了。


I'm writing a Firefox extension and I need to find the ip address of the currently loaded page. I can get the hostname of the page with window.location.host, but is there any way to find the ip for that hostname?

I tried looking for the answer at the Mozilla Developer Center but was unable to find anything.

EDIT: I would use something like PHP to do this, but cannot, because it's a firefox extension, running on the client side only. I have no web server to do back end PHP.

解决方案

You could look at how the ShowIP Firefox extension does it.

这篇关于在Firefox扩展中查找IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆