Quote:
Originally Posted by fluffygrrl
|
You're fucking kidding, right?
Loading a text file for each hit, not using SHM or some other caching, and an entire lack of knowledge of ip2long()?
Please tell me you're not doing this professionally. This dumb thing is... just stupid. Hell, if this is all of the functionality you require, have someone install mod_geoip and use the built-in functions for Apache; it will load into SHM and not do an incredibly dumb foreach() match for everything. This is worse than a bubblesort.
P.S. When you find a match, break from the loop.