MrCooL
MrCooL

Reputation: 926

Remote User's hostname + App Engine Python

Similar to:

remote_addr - The remote user's IP address.

self.request.remote_addr

Instead, is there a way to get the remote user's hostname ? Something similar maybe like,

self.request.hostname

As from the official document, The Request Class, doesn't seem to have the option to get the remote user's hostname.

I'm trying to uniquely identify a machine, with the combination of hostname+ip, because there are some users may share the internet gateway, thus having same IP address is possible and that would make ip address not unique enough.

Any advice on this ? or at least, could anyone suggest alternative way to uniquely identify an machine with anonymous identity ?

Upvotes: 0

Views: 971

Answers (2)

Nick Johnson
Nick Johnson

Reputation: 101149

No, there's no way to do reverse DNS lookups on App Engine, and the information is not supplied by HTTP or the App Engine environment. Further, this wouldn't help you, for a couple of reasons:

  • The reverse DNS will be the same for every user with a given IP, since it depends only on the IP.
  • Anyone who has control over their reverse DNS can set it to anything they like.

Upvotes: 2

dragonx
dragonx

Reputation: 15143

I don't think this is possible over HTTP. Generally, cookies are used for this purpose.

Upvotes: 1

Related Questions