From: Steven te Brinke <[EMAIL PROTECTED]>
Date: 8 May 2008 11:31:43 BDT
To: elvin ibbotson <[EMAIL PROTECTED]>
Cc: [email protected]
Subject: Re: [OSM-talk] OSM XAPI - help!


Delivering data as an attachment is just adding one header to tell the browser that it should present it as an attachment to the user. Thus the content is the same as if it wasn't an attachment. The php function file() works fine, as should any other function.

This doesn't seem to be what's happening here. There is a header indicating the data is included in an attachment:
Content-Disposition: attachment; filename=data.osm
The html file itself does not include the OSM data, just some stuff about the parameters of the call, copyright, etc. If I call the xapi script using a browser it downloads the data.osm file but if it is called from my own PHP script (on my server) I just get the html file and not the data file.

elvin




Steven


elvin ibbotson schreef:

I am making this request here because I am not sure who looks after the xapi code. I have posted a question on the xapi talk page on the wiki but it may not get noticed.

I am using my limited skills as a PHP novice to access subsets of data via xapi for conversion to a compact binary format, but the query format (eg. osmxapi.hypercube.telascience.org/api/0.5/way [highway=motorway|trunk][bbox=....] delivers the data as an attachment (data.osm) and I do not know how to access this using PHP. My script is derived from those by Adam Boardman and Paul Fox for the binary data proposal which use the OSM API and expect the XML data to be in the body of the HTML rather than as an attached file. But the standard API is limited to 0.25 degrees and does not allow the content filtering offered by xapi. I would appreciate some advice from the xapi expert(s) on how to...

get the data bundled into the body or...

tell xapi where to save the data file attachment or...

save/open/read the data file using PHP

elvin ibbotson


_______________________________________________
talk mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk

Reply via email to