Wednesday 16 July 2008

Mapping API

A mapping API is available at http://lms.virtual-presence.org/api/

Check the HTML form to learn about the parameters.

3 comments:

Norman said...

Is it possible to change the User-Agent to something else than "PEAR HTTP_Request class ( http://pear.php.net/ )". Also what about adding a Via header so the requester's IP address is available to the server too?

Heiner said...

Good idea. Definitely the User-Agent. I'll check the Via-thing.

Heiner said...

The HTTP client now has a meaningful "User-Agent" header:

User-Agent: LMS API with LibVpi for PHP 0.5 (http://lms.virtual-presence.org)

I checked the HTTP spec for the "Via" header. I think it is meanst specifically for proxies. Also I would like to add more data from the original request, so I "invented" a "X-For" header. The api now sends something like:

X-For: Remote-Address="123.456.789.123" Referer="http://lms.virtual-presence.org/api/" User-Agent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"