Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial 如何根据ip获得运营商的信息

如何根据ip获得运营商的信息

Jun 23, 2016 pm 01:50 PM
ip information Operator

不只限国内运营商,应该有一些国外公司提供类似的web服务,有做过的朋友给推荐几个,谢谢啦


回复讨论(解决方案)

何谓“运营商”

查IP就可以获取了

何谓“运营商”



比如移动、联通、电信等等。。。

首先你需要一个IP地址库或者是IP查询接口

早年的珊瑚虫QQ你用过吧?  里面使用的纯真数据库,有某个IP段对应某个省市运营商的信息,纯真团队现在还是在维护中的。


另外你也可以用线上一些公开的IP查询接口

例如新浪就有免费提供的公开IP查询接口,良心企业...

function sina($ip)
{
$str = file_get_contents("http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=".$ip);
return $str;
}

首先你需要一个IP地址库或者是IP查询接口

早年的珊瑚虫QQ你用过吧?  里面使用的纯真数据库,有某个IP段对应某个省市运营商的信息,纯真团队现在还是在维护中的。


另外你也可以用线上一些公开的IP查询接口

例如新浪就有免费提供的公开IP查询接口,良心企业...

function sina($ip)
{
$str = file_get_contents("http:……



非常感谢,可以用,就是不知道对国外的运营商能否查到详细的信息,主要是针对国外IP的。

function sina($ip)
{
$str = file_get_contents("http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=".$ip);
return $str;
}

这个具体怎么用?

Statement of this Website
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

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

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How do websites set black/whitelist IP restrictions and country and city IP access restrictions through nginx? How do websites set black/whitelist IP restrictions and country and city IP access restrictions through nginx? Jun 01, 2023 pm 05:27 PM

1. Black/white list IP restricted access configuration nginx There are several ways to configure black and white lists. Here are only two commonly used methods. 1. The first method: allow, denydeny and allow instructions belong to ngx_http_access_module. nginx loads this module by default, so it can be used directly. This method is the simplest and most direct. The setting is similar to the firewall iptable. How to use: Add directly to the configuration file: #Whitelist settings, followed by allow is accessible IPlocation/{allow123.13.123.12;allow23.53.32.1/100;denyall;}#Blacklist settings,

How to check IP address on WeChat How to check IP address on WeChat May 31, 2023 am 09:16 AM

How to check the IP address on WeChat: 1. Log in to the computer version of WeChat, right-click the taskbar at the bottom of the screen, and click "Task Manager"; 2. When the task manager pops up, click "Details" in the lower left corner; 3. Task management Enter the "Performance" option of the browser and click "Open Resource Monitor"; 4. Select "Network" and check the WeChat process "Wechat.exe"; 5. Click "TCP Connection" below to monitor the WeChat network IP related situation. Sending a message and getting a reply will reveal the other person's IP address.

How to set directory whitelist and ip whitelist in nginx How to set directory whitelist and ip whitelist in nginx May 18, 2023 pm 03:52 PM

1. Set the directory whitelist: There is no restriction on the specified request path. If there is no restriction on the request path to the api directory, it can be written as server{location/app{proxy_passhttp://192.168.1.111:8095/app ;limit_connconn20;limit_rate500k;limit_reqzone=fooburst=5nodelay;}location/app/api{proxy_passhttp://192.168.1.111:8095/app/api}}#Because nginx will give priority to accurate matching

Local IP address query Local IP address query Jan 05, 2024 pm 01:42 PM

The methods for querying the IP address of this machine are: 1. Under Windows system, open the "Start Menu" and search for "cmd" to open the command prompt, enter "ipconfig", and then press the Enter key to find a line named "IPv4 Address" , the number next to it is the IP address of the machine; 2. Under macOS system, click the Apple icon in the upper left corner of the screen, select "System Preferences", find the currently connected network in the "Network" option, and click the "Advanced" button , find the IP of the machine in the "TCP/IP" tab, etc.

How to share contact details with NameDrop: How-to guide for iOS 17 How to share contact details with NameDrop: How-to guide for iOS 17 Sep 16, 2023 pm 06:09 PM

In iOS 17, there's a new AirDrop feature that lets you exchange contact information with someone by touching two iPhones. It's called NameDrop, and here's how it works. Instead of entering a new person's number to call or text them, NameDrop allows you to simply place your iPhone near their iPhone to exchange contact details so they have your number. Putting the two devices together will automatically pop up the contact sharing interface. Clicking on the pop-up will display a person's contact information and their contact poster (you can customize and edit your own photos, also a new feature of iOS17). This screen also includes the option to "Receive Only" or share your own contact information in response.

How to get the GPU in Windows 11 and check the graphics card details How to get the GPU in Windows 11 and check the graphics card details Nov 07, 2023 am 11:21 AM

Using System Information Click Start and enter System Information. Just click on the program as shown in the image below. Here you can find most of the system information, and one thing you can find is graphics card information. In the System Information program, expand Components, and then click Show. Let the program gather all the necessary information and once it's ready, you can find the graphics card-specific name and other information on your system. Even if you have multiple graphics cards, you can find most content related to dedicated and integrated graphics cards connected to your computer from here. Using the Device Manager Windows 11 Just like most other versions of Windows, you can also find the graphics card on your computer from the Device Manager. Click Start and then

What should I do if my wifi shows no IP allocation? What should I do if my wifi shows no IP allocation? Aug 30, 2023 am 11:58 AM

Solution to wifi showing no IP allocation: 1. Restart the device and router, turn off the Wi-Fi connection on the device, turn off the device, turn off the router, wait a few minutes, then reopen the router to connect to wifi; 2. Check the router settings and restart DHCP, make sure the DHCP function is enabled; 3. Reset network settings, which will delete all saved WiFi networks and passwords. Please make sure they are backed up before performing this operation; 4. Update the router firmware, log in to the router management interface, and find the firmware Update options and follow the prompts.

What does IP mean? What does IP mean? Jan 05, 2024 pm 01:34 PM

The common meanings of IP include "IP address", "intellectual property", "unique selling point" and "independence": 1. IP address is a digital identifier used to identify and locate equipment in computer networks; 2. Intellectual property , refers to the rights and interests enjoyed by people’s intellectual creations, including patents, trademarks, copyrights, trade secrets, etc.; 3. Unique selling points are the unique characteristics of a product or service that distinguish it from competitors and attract customers; 4. Independence refers to the ability of a country or region to make independent decisions and manage itself without external control or interference.

See all articles