source: subversion/sites/other/osmabrowser/getosm.php @ 8920

Last change on this file since 8920 was 1478, checked in by nick, 13 years ago

Added current osmabrowser to svn

File size: 477 bytes
Line 
1<?php
2require_once('defines.php');
3//header("Content-type: text/xml");
4
5$bbox = (isset($_GET['bbox'])) ? $_GET['bbox'] : '-0.75,51.02,-0.7,51.07';
6
7echo grabosm ($bbox);
8
9function grabosm($bbox)
10{
11        $url = "http://www.openstreetmap.org/api/0.3/map?bbox=$bbox";
12        $ch=curl_init ($url);
13        curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
14        curl_setopt($ch,CURLOPT_HEADER,false);
15        curl_setopt($ch,CURLOPT_USERPWD,OSM_LOGIN);
16        $resp=curl_exec($ch);
17        curl_close($ch);
18        return $resp;
19}
20
21?>
Note: See TracBrowser for help on using the repository browser.