here's a trick to make MapServer URLs shorter
Richard Greenwood
richard.greenwood at GMAIL.COM
Sat Jan 22 05:45:55 PST 2005
On Fri, 21 Jan 2005 14:22:53 -0800, Ken Lord <kenlord at gmail.com> wrote:
> Nice job Gregor,
>
> My URL's do get pretty crazy ... there's a lot of things you can do
> with URL's that all those php'ers may not know about or may think only
> they can do, and your tool looks to streamline the system nicely.
>
> Is there a way to make this work through IIS?
Here are 3 ASP examples (2 jScript, 1 VB).
<%@language=JScript%>
<%
// Server.ScriptTimeout = 360
var qstring = Request.ServerVariables("QUERY_STRING")
var host= Request.ServerVariables("HTTP_HOST")
var uri = "http://"+host+"/mapserver/mapserv.exe?map=/inetpub/wwwroot/mapserver/rejh/rejh.map&"
+ qstring;
var objHTTP
objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.open("GET", uri, false);
objHTTP.send();
Response.ContentType = objHTTP.getResponseHeader("content-type");
Response.BinaryWrite (objHTTP.responseBody);
%>
<%
/*
JScript example from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmobjxmldomserverxmlhttp_using_directly.asp
var objSrvHTTP;
objSrvHTTP = Server.CreateObject ("MSXML2.ServerXMLHTTP");
objSrvHTTP.open ("GET","http://someotherserver/respond.asp", false);
objSrvHTTP.send ();
Response.ContentType = "text/xml";
Response.Write (objHTTP.responseXML.xml);
*/
%>
<%
/*
VB example from:
http://mapserver.gis.umn.edu/doc40/wms-server-howto.html#onlineresourceurl
Server.ScriptTimeout = 360
strRequest = Request.ServerVariables("QUERY_STRING")
strURL = "http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\WMS\mymap.map&"
& strRequest
Dim objHTTP
Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.open "GET", strURL, false
objHTTP.send ""
Response.ContentType = objHTTP.getResponseHeader("content-type")
Response.BinaryWrite objHTTP.responseBody
Set objHTTP = Nothing
*/
%>
Regards,
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the MapServer-users
mailing list