search
HomeWeb Front-endJS TutorialTencent and Sina's interface for obtaining the current geographical location (province) through IP address_jquery

Tencent's interface is to return an array http://fw.qq.com/ipaddress
Return value var IPData = new Array("61.135.152.194","","Beijing City","");
Sina's interface: http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js Multi-region testing method: http://int.dpool.sina.com.cn/iplookup/iplookup. php?format=js&ip=218.192.3.42
Return value var remote_ip_info = {"ret":1,"start":"218.192.0.0","end":"218.192.7.255","country":"u4e2du56fd ","province":"u5e7fu4e1c","city":"u5e7fu5dde","district":"","isp":"u6559u80b2u7f51","type":"u5b66u6821","desc":"u5e7fu5ddeu5927u5b66u7ebau7ec7u670du88c5u 5b66u9662"};


Get the corresponding data through jquery

Copy the code The code is as follows:

$.getScript('data interface', function(){
//Tencent: IPData[0] 
 //Sina: remote_ip_info.country
...
} )
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
cmd怎么查看局域网所有ipcmd怎么查看局域网所有ipFeb 20, 2023 pm 02:22 PM

cmd查看局域网所有ip的方法:1、按“Win+R”快捷键打开“运行”窗口;2、在“运行”窗口中输入“CMD”后,按回车键;3、在打开的“命令提示符”界面中,输入命令“arp -a”并按回车键;4、从返回结果就可以看到本地局域网中的所有与本机通信的计算机IP地址。

主机的域名和主机的ip地址两者之间的关系是什么主机的域名和主机的ip地址两者之间的关系是什么Jan 14, 2021 pm 06:02 PM

主机的域名和主机的ip地址两者之间的关系是:一个IP地址对应多个域名。IP地址用数字化形式来对计算机网络中的主机进行网络标识,域名用字符化形式来对计算机网络中的主机进行网络标识。在Internet中,一个域名之内能够对应一个IP地址,但是一个IP地址可以被多个域名所对应。

在因特网上的每一台主机都有唯一的地址标识称为什么在因特网上的每一台主机都有唯一的地址标识称为什么Aug 22, 2022 pm 03:24 PM

每一台主机都有唯一的地址标识称为“IP地址”。IP地址是IP协议提供的一种统一的地址格式,它为互联网上的每一个网络和每一台主机分配一个唯一的逻辑地址,以此来屏蔽物理地址的差异。由于有这种唯一的地址,才保证了用户在连网的计算机上操作时,能够高效而且方便地从千千万万台计算机中选出自己所需的对象来。

PHP实现IP地址查询功能PHP实现IP地址查询功能Jun 22, 2023 pm 11:22 PM

随着网络的快速发展,IP地址成为了网络通信中不可或缺的一环。在进行网络安全监测、流量管理、电商广告定向投放等方面,IP地址的信息非常重要。因此,为了方便用户查询IP地址/域名信息,许多网站提供了IP地址查询功能。本篇文章将介绍如何用PHP实现IP地址查询功能,供读者参考。一、何为IP地址?IP地址(InternetProtocolAddress)即网络协

ip地址是由多少位二进制数组成ip地址是由多少位二进制数组成Mar 01, 2023 pm 04:35 PM

ip地址是由32或128位二进制数组成。IP地址是IP协议提供的一种统一的地址格式,IP地址分两种:1、ipv4地址,由32位二进制数组成,用点分十进制表示,每八位划分,也就是四个0~255的十进制数;2、ipv6地址,由128位二进制数组成,用点分十六进制表示,每八位划分,也就是十六个0x00~0xff的十六进制数。

ip地址后面/24是什么意思ip地址后面/24是什么意思Nov 23, 2022 am 11:36 AM

ip地址后面的“/24”表示掩码位是24位的。IP地址是四个十进制数组成的,相当于32位二进制;而ip地址后面斜杠加具体数字是一种用CIDR形式表示的一个网段,或者说子网。ip地址后“/24”指32位二进制的前24位用"1"表示,后面8位用0表示,即“11111111 11111111 11111111 000000”;将其转化为十进制,就是“255.255.255.0”。

Java如何获取客户端的IP地址?Java如何获取客户端的IP地址?Apr 26, 2023 pm 05:25 PM

一、前言环境:jdk1.8+idea2019.3+Windows10二、摘要项目开发中,在日常处理操作日志时,基本都会通过aop切面来实现用户操作日志的记录,但涉及到记录操作日志,想必肯定会有一项是基本都会参考记录的,那就是操作人的客户端ip地址,日后查"脏"也方便。那么问题来了。具体怎么获取客户端的ip地址啊?哈哈哈,这就是我这期的教学内容,若是有的小伙伴知道怎么获取,那么我要表扬你,但是实现思路是否与我有同异?所以你也可以尝试看下bug菌是如何实现的吧。接下来,我就开始教

ip地址为什么和所在地不一样ip地址为什么和所在地不一样Nov 21, 2022 pm 01:52 PM

ip地址和所在地不一样的原因:1、运营商IP分配错误会导致IP真实所在地与腾讯IP数据库匹配到的IP所在地不同;2、使用代理服务器导致的;3、非官方版本导致的,请检查所使用的软件版本,是否为官方软件,只有官方版本才会应用更加精确的IP数据库。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.