Most definitley possible. One method would be as follows:
Get the IP address ($_SERVER[REMOTE_ADDR]).
Use a service that translates the IP address to a location. There are many available. A common application is combining this with traceroute, so a search for traceroute should bring up some leads. I've found some in the past this way although I can't remember their details.
There may already be alibrary that does this stuff for you. Does anyone know of it?
hth
- Kevin 🙂