PHP获取IP的有关问题
PHP获取IP的问题
用$_SERVER获取的IP好像跟实际的有出入,不知道怎么回事
你们获取IP用的啥办法?
现在这个数据对这个项目很重要,所以要求比较准确
用js是不是会更准确?
有个数据是:211.139.151.74
您查询的IP:211.139.151.74
本站主数据:广东省 移动(全省共用)
查询结果2:广东省 移动(全省共用)
查询结果3:广东省 移动GPRS(全省通用)
这个啥意思呢?
------解决方案--------------------
·正常情况下js没有权限得到ip之类的信息
·如果你需要更准确的,可以考虑使用插件
------解决方案--------------------
unset($onlineip);
if($_SERVER['HTTP_CLIENT_IP']){
$onlineip=$_SERVER['HTTP_CLIENT_IP'];
}elseif($_SERVER['HTTP_X_FORWARDED_FOR']){
$onlineip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}else{
$onlineip=$_SERVER['REMOTE_ADDR'];
}
------解决方案--------------------
用$_SERVER获取的IP好像跟实际的有出入,不知道怎么回事 ??
是不是内网?不然应该不会有出入啊。
您查询的IP:211.139.151.74
本站主数据:广东省 移动(全省共用)
查询结果2:广东省 移动(全省共用)
查询结果3:广东省 移动GPRS(全省通用)
这个啥意思呢?
你到别人的网站查IP信息?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The message "Your organization has asked you to change your PIN" will appear on the login screen. This happens when the PIN expiration limit is reached on a computer using organization-based account settings, where they have control over personal devices. However, if you set up Windows using a personal account, the error message should ideally not appear. Although this is not always the case. Most users who encounter errors report using their personal accounts. Why does my organization ask me to change my PIN on Windows 11? It's possible that your account is associated with an organization, and your primary approach should be to verify this. Contacting your domain administrator can help! Additionally, misconfigured local policy settings or incorrect registry keys can cause errors. Right now

Screen brightness is an integral part of using modern computing devices, especially when you look at the screen for long periods of time. It helps you reduce eye strain, improve legibility, and view content easily and efficiently. However, depending on your settings, it can sometimes be difficult to manage brightness, especially on Windows 11 with the new UI changes. If you're having trouble adjusting brightness, here are all the ways to manage brightness on Windows 11. How to Change Brightness on Windows 11 [10 Ways Explained] Single monitor users can use the following methods to adjust brightness on Windows 11. This includes desktop systems using a single monitor as well as laptops. let's start. Method 1: Use the Action Center The Action Center is accessible

In iOS 17, Apple introduced several new privacy and security features to its mobile operating system, one of which is the ability to require two-step authentication for private browsing tabs in Safari. Here's how it works and how to turn it off. On an iPhone or iPad running iOS 17 or iPadOS 17, Apple's browser now requires Face ID/Touch ID authentication or a passcode if you have any Private Browsing tab open in Safari and then exit the session or app to access them again. In other words, if someone gets their hands on your iPhone or iPad while it's unlocked, they still won't be able to view your privacy without knowing your passcode

HTTP status code 520 means that the server encountered an unknown error while processing the request and cannot provide more specific information. Used to indicate that an unknown error occurred when the server was processing the request, which may be caused by server configuration problems, network problems, or other unknown reasons. This is usually caused by server configuration issues, network issues, server overload, or coding errors. If you encounter a status code 520 error, it is best to contact the website administrator or technical support team for more information and assistance.

The famous activation script MAS2.2 version supports digital activation again. The method originated from @asdcorp and the team. The MAS author calls it HWID2. Download gatherosstate.exe (not original, modified) from https://github.com/massgravel/Microsoft-Activation-Scripts, run it with parameters, and generate GenuineTicket.xml. First take a look at the original method: gatherosstate.exePfn=xxxxxxx;DownlevelGenuineState=1 and then compare with the latest method: gatheros
![How to Hide and Unhide Folders on Windows 11 [3 Ways]](https://img.php.cn/upload/article/000/887/227/169542942766265.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
Hiding folders is a great way to keep your desktop organized. Maybe you want to keep your personal files or some client details away from prying eyes. Whatever it is, the ability to put them away and unhide them when necessary is a big saver. In short, these hidden files will not show up in the main menu, but they will still be accessible. It's very simple and shouldn't take you too much time. How to hide a folder in Windows 11? 1. Use File Explorer and hit the + key to open File Explorer. WindowsE Find the folder you want to hide, right-click it and select Properties. Navigate to the General tab, check the Hide box, click Apply, and then click OK. In the next dialog box, check Apply changes to this folder, sub-folder

WindowsServerBackup is a function that comes with the WindowsServer operating system, designed to help users protect important data and system configurations, and provide complete backup and recovery solutions for small, medium and enterprise-level enterprises. Only users running Server2022 and higher can use this feature. In this article, we will explain how to install, uninstall or reset WindowsServerBackup. How to Reset Windows Server Backup If you are experiencing problems with your server backup, the backup is taking too long, or you are unable to access stored files, then you may consider resetting your Windows Server backup settings. To reset Windows

Understand the meaning of HTTP 301 status code: common application scenarios of web page redirection. With the rapid development of the Internet, people's requirements for web page interaction are becoming higher and higher. In the field of web design, web page redirection is a common and important technology, implemented through the HTTP 301 status code. This article will explore the meaning of HTTP 301 status code and common application scenarios in web page redirection. HTTP301 status code refers to permanent redirect (PermanentRedirect). When the server receives the client's
