URL: http://bcmoney-mobiletv.com/blog/2009/05/01/the-server-side-proxy/
Classic ASP with VBscript (i.e. ASP.net before dominance of C#), some resources used:
http://www.webcheatsheet.com/asp/getcurrentpage_url.php
http://support.microsoft.com/kb/290591
http://w3schools.com/asp/asp_examples.asp
http://msdn.microsoft.com/en-us/library/ms762278(VS.85).aspx
http://www.mikesdotnetting.com/Article/39/AJAX-and-Classic-ASP
http://www.w3enterprises.com/articles/aspnet.aspx
http://www.asp101.com/samples/winhttp5.asp
http://www.devarticles.com/c/a/ASP/An-Introduction-To-XML-SOAP-Using-ASP-and-VB6/
http://www.tizag.com/aspTutorial/aspVBScript.php
http://classicasp.aspfaq.com/general/how-do-i-read-the-contents-of-a-remote-web-page.html
<%@LANGUAGE="VBSCRIPT"%> <% 'gather the required Query Parameters URL, Format, Encoding dim url url = Request.QueryString("url") If url<>"" Then url = "http://example.com" End If dim format format = Request.QueryString("f") If format<>"" Then format = "text/plain" End If dim encoding encoding = Request.QueryString("e") If encoding<>"" Then encoding = "UTF-8" End If 'create a unique instance NONCE to ensure proxied calls are not cached dim instanceID instanceID = Session.SessionID 'perform the HTTP Request dim xmlhttp set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP") xmlhttp.Open "GET",url&"instanceID="&instanceID,false 'IF doing a POST: use --> "POST",url,false '"": set DataToSend = value then call ---> xmlhttp.send DataToSend '"": also set Content-Type of POST body ---> xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" 'display the response Response.ContentType = format 'May want to check IF ContentType == "text/xml" Response.Charset = encoding 'UTF-8 should be fine for most uses unless not supported, then go with: Response.Write xmlhttp.responseText 'IF ContentType == "text/xml": Response.Write xmlhttp.responsexml.xml Response.End() Set xmlhttp = nothing %>
You need to login to post a comment.
