Last active
August 29, 2015 14:24
-
-
Save JavaScript-Packer/8d3816959f01f29f7634 to your computer and use it in GitHub Desktop.
ASP function for loading external URL. Use in a custom 404.asp error page to make dynamic URLS like http://www.holybiblesearch.net/Jesus.htm (Jesus.htm is not found, loads a page anyhow).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@ LANGUAGE="VBSCRIPT" %> | |
| <% | |
| sub fetch(URL) | |
| Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP") | |
| objXMLHTTP.Open "GET", URL, false | |
| objXMLHTTP.Send | |
| Response.Write objXMLHTTP.responseText | |
| Set objXMLHTTP = Nothing | |
| response.end 'remove this if not using for 404.asp or it will kill the page after load | |
| end sub | |
| %> | |
| <% fetch("http://www.whak.com") %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment