【php开源代码栏目提醒】:网学会员在php开源代码频道为大家收集整理了ziplookup.php提供大家参考,希望对大家有所帮助!
<?php
header('Content-Type: text/xml');
// Load the XML location data from the server
$
xml = html_entity_decode(file_get_contents(
"http://www.
webservicex.net/uszip.asmx/GetInfoByZIP?USZip=" . $_REQUEST['zipCode']));
// Return the XML location data
echo $xml;
?>