Keeping the KISS principle (thanks to Derick for reminding us of this
principle) in mind, we could look at an auto selection of the mirror
site for anyone who directly comes to www.php.net . The auto selected
mirror could also be set inside the cookie for anyone who does not
already have a cookie.
This can easily be done by an IP-to-Country map. The first page of the
php.net site will check the cookie and see if there is a mirror set, if
so then redirect to this mirror. If not then check the ip address of the
client and redirect the user to his/her country's mirror. From the ip
address we can easily determine the country of the user. Take a look at
www.ip-to-country.com . It's a small project that we have started which
will eventually grow to an IP to city database. We are giving the
database free for now and I can make sure that it remains free for php
for ever :o).
Well, there is already some code to handle GeoIP data... I don't know what's the state of this....
Also, on a curious note, can someone update me as to how much traffic
the main php.net site gets. There seems to be quite a strong
determination to drive the traffic to the mirrors :o).
I don't have any accurate data. The stats parser is not working right now...
Goba