Display Content from Another Web Site ASP Script - ASP Web Pro
  Active Server Pages Programming by ASP Web Pro

ASP Scripts

DISPLAY CONTENT FROM ANOTHER WEB SITE

Occasionally, it is necessary to retrieve content from another web site and display it in your own web pages. Of course, now a days most web sites that allow you to use their content on your web pages will already have their own system in place where you will just add some basic HTML to your pages and their content will display automatically so you wouldn't need this.

For those few instances, though, where you might need to do this, here is how. Assuming that you have permission to use their content, place the below script into your source code and add the URL of the page you want to retrieve the content from.

<%
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", "http://www.domainname.com", false
objHTTP.Send
Response.Write objHTTP.ResponseText
%>

Granted, this is a limited script so it may not suit all of your needs, but chances are if you want to do something more sophisticated than this, you probably should not be using this script. I realize this is a very touchy subject today so please use this script wisely and ALWAYS GET PERMISSION FIRST!

< Back to ASP Scripts


 

 

Main Menu
Home
ASP Scripts
ASP Tutorials
JavaScripts
Awards
Contact Us

Email This Page

Other Resources
ASP Web Hosting
Search Engine Submission
Programming Help

 

 

 

Other ASP Web Sites

Site Map

 

Last Updated:
09 May 2008