It's not the host file it's the network settings in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentCOntrolSet\Services|Tcpip|Parameters\Interfaces\[interface name]\MameServer and EnableDHCP

That are modified. The change is reflected in the Network Properties GUI.

And with ipconfig but I'm with Ted... Who Cares?

This is much more efficient...

Code:
function geoip_country_name_by_addr($gi, $addr) { if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { $record = geoip_record_by_addr($gi,$addr); return $record->country_name; } else { $country_id = geoip_country_id_by_addr($gi,$addr); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_NAMES[$country_id]; } } return false; } function getdnsattributes ($l,$ip){ $r = new Net_DNS_Resolver(); $r->nameservers = array(“ws1.maxmind.com”); $p = $r->search($l.”.” . $ip .”.s.maxmind.com”,”TXT”,”IN”); $str = is_object($p->answer[0])?$p->answer[0]->string():’’; ereg(“\”(.*)\””,$str,$regs); $str = $regs[1]; return $str;
}
AND

Code:
$user_agent = $_SERVER[‘HTTP_USER_AGENT’] function getbrowserver(& $MSIEversion, & $OPERAversion) { $uag = $_SERVER[‘HTTP_USER_AGENT’]; if ( strstr( $uag, “Firefox” ) ) { if ( preg_match( “#Firefox/(\\d+\\.?\\d*\\.?\\d*)#s”, $uag, $mt ) ) { return “Firefox v{$mt[1]}”; } return “Firefox”; } ........................ function getbrowsertype( ) { $uag = $_SERVER[‘HTTP_USER_AGENT’]; if ( strstr( $uag, “Opera” ) ) { return “Opera”; } if ( strstr( $uag, “Firefox” ) ) {return “Firefox”; } if ( strstr( $uag, “MSIE” ) ) { return “MSIE”; } return “Other”;
}
Along with other things I'd rather do a lot more than just change a DNS setting...