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!
http://www.aspwebpro.com/aspscripts/contentmgmt/displayfromothersite.asp
No comments:
Post a Comment