curl 'http://www.apache.org/dyn/closer.cgi?as_json=1'
gives something like
{
       "backup": [ "http://www-eu.apache.org/dist/";,
"http://www-us.apache.org/dist/"; ],
         "cca2": "ru",
         "http": [ "http://apache-mirror.rbc.ru/pub/apache/"; ],
    "path_info": "",
    "preferred": "http://apache-mirror.rbc.ru/pub/apache/";
}

Then you grep for preferred somehow, then construct the proper URL.

Does that work for you?
Vladimir

Reply via email to