Your plan is impractical. Many user's IP address changes every time
they start an Internet session. Many users share an IP address, for
example, in a company location, a hotel, an apartment, even within a
home. This will show Dad's PC the popup, but won't show it on
Junior's notebook, because Dad's PC has already seen it and they
both share a router. Or some neighbor in an apartment complex has
already seen it...
What's wrong with a cookie?
just the last gateway it hit on the trip from client to
server
The server can get the
IP address of the client, or of the last proxy server.
Gateways don't change source IP addresses, they just pass
packets along. Proxy servers have their own IP address.