here's a trick to make MapServer URLs shorter

Ken Lord kenlord at GMAIL.COM
Sun Jan 23 16:52:24 EST 2005


Nice, thanks RIchard


On Sat, 22 Jan 2005 06:45:55 -0700, Richard Greenwood
<richard.greenwood at gmail.com> wrote:
> 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
>


--
==============================
Ken Lord B.Sc., A.Dipl.T.H.
7488 Magnolia Terrace
Burnaby BC, V5E 4L1
604-777-2171
kenlord at gmail.com
kenlord at email.com
klord at bgcengineering.com



More information about the mapserver-users mailing list