Version: 1
Type: Function
Category: Other
License: GNU General Public License
Description: This function creates a url you can use in an image tag to pull up a mapquest map
<?
function get_map($street,$city,$state,$zip)
{
$fd = fopen ("http://www.mapquest.com/maps/map.adp?".
"country=US&address=".urlencode($street)."&city=".urlencode($city)."state=".urlencode($state)."&zipcode=".
urlencode($zip)."&homesubmit.x=0&homesubmit.y=0", "r");
while (!feof ($fd)) {
$buffer .= fgets($fd, 4096);
//echo $buffer;
}
fclose ($fd);
$ar=split("mq-mapgend.websys.aol.com",$buffer);
$ar2=split(" width=356 height=249",$ar[1]);
return "http://mq-mapgend.websys.aol.com".(substr($ar2[0],0,(strlen($ar2[0])-1)))."";;
}
?>