I'm writing a web page that will detect which college campus a user is accessing the site from. I have a list of which IP ranges go with which campuses. My question is whether it would be better to detect the user's campus from their IP, using this list, or from their hostname, or both.
My concern with using IP ranges is that these may change, and my list (found online) may already be out of date. My concern with using hostnames is that I don't know whether all campus computers will have the hostname of the campus. If neither of these methods is sufficient, maybe I should use both?