Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Get HTML Source of any URL

0.00/5 (No votes)
3 Apr 2001 1  
This articles shows how to get HTML source of a URL, even if the URL uses tricks to prevent you from viewing the source

Introduction

Some web sites don't let you view the source code by disabling the right mouse key. Some other web sites don't display top level menus, so you can not view source using "View + Source" menu option.

How to display the code

So, how do you display the code, if a site uses one of the above method to prevent you from seeing the source code. The sample ASP application uses Microsoft XMLHttp object to get a URL's source code. It just makes a synchronous HTTP Get request and displays the response in a textarea.

Installation Notes

Copy the ASP file to the root directory (typically, inetpub/wwwroot). You must run either a Personal Web Server on your machine or have access to a web server that runs IIS.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here