开发者

How does google obtain the IP address they report for "Last Account Actiivty"

Can anybody let me know the logic they use to get the IP?开发者_如何学Go


The server has to know your IP address to send you a response. That is how the internet works. Presumably they store the IP address for the last account activity in a database somewhere.


When your browser connects to their web site, their HTTP server determines the IP address from the connected socket. That IP address is supplied to Google's web application framework, which stores the IP address in some kind of data store, so that it can be retrieved later. I can't give you much more detail, since I don't work for Google (and even if I did, I probably wouldn'couldn't).


request.getRemoteHost();

this method in the request object will return the ip address of the client.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜