The way we call it is . It can return the user IP and address, for example: var IPData = new Array("220.181.108.85","","Beijing",""); We can then use IPData[0] as the user IP.
But I don’t know what happened to Tencent recently. This address has become invalid, prompting "HTTP 500 Internal Server Error".
Another way to get the client IP using JavaScript
Recently, I discovered another way to get the client IP. This service is provided by a foreign website. How to use: