home | web-mapping | data | scripts | bestiary | about | archive

GeoRSS. Geographically Encoded Objects for RSS feeds

oooh, a new standard. Encode location in an RSS feed using GeoRSS.

Easily parse using MagpieRSS:

$rssGeo = fetch_rss('http://www.geonames.org/recent-changes.xml');
foreach ($rssGeo->items as $arrItem) {
echo '<p><a href="' . $arrItem['link'] . '">' . $arrItem['title'] . '</a></p><p>' . $arrItem['description'] . '<br />';
foreach ($arrItem['georss'] as $key => $value) {
echo $key . '—' . $value;
}
echo '</p>';
}

View the above code in action.

Leave a Reply

schiller labs is powered by wordpress . dev site and tool shed for emptystreets.net . valid xhtml . valid css