Click here to Skip to main content
Licence 
First Posted 27 Mar 2001
Views 228,223
Downloads 2,449
Bookmarked 36 times

Get HTML Source of any URL

By Dhandapani Ammasai | 3 Apr 2001
This articles shows how to get HTML source of a URL, even if the URL uses tricks to prevent you from viewing the source
3 votes, 42.9%
1

2

3

4
4 votes, 57.1%
5
2.71/5 - 24 votes
μ 2.71, σa 3.74 [?]

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

About the Author

Dhandapani Ammasai



India India

Member
Dhandapani Ammasai(Dan in short) is a software delivery manager at a top tier IT company in India.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralCode in ASP.NET Pinmemberarwany2@yahoo.com23:11 19 Sep '07  
QuestionGetSourceCode.asp is giving error PinmemberJaks M1:18 23 Dec '06  
GeneralPls Help me Emergently PinmemberAlexDa1:20 13 Mar '06  
GeneralWindow to fill the screen PinsussAnonymous1:59 25 Jan '05  
GeneralEasy Source Code View PinsussRajaRavipati0:57 1 Sep '04  
GeneralRe: Easy Source Code View Pinmemberrichardhennessy5:53 10 Feb '05  
GeneralEasy Source Code View PinsussRajaRavipati0:48 1 Sep '04  
GeneralWorking perfectly for one url. I need to do it for multiple urls. PinsussAnonymous5:39 16 May '03  
GeneralWorking perfectly for one url. I need to do it for multiple urls. PinsussAnonymous5:39 16 May '03  
GeneralWas lookin for something like this last week PinmemberIvel12:47 13 Mar '03  
Generalview-source protocol Pinmember.S.Rod.19:03 29 Oct '02  
GeneralGetSourceCode.asp is giving error Pinsussvikas kumar18:02 29 Oct '02  
Generalthelp me please PinsussAnonymous23:09 10 Jul '02  
GeneralProblem with this method. PinmemberSantiago Suarez15:22 9 Jun '02  
GeneralThis always works. PinmemberMike Whitenton9:48 7 Feb '02  
GeneralRe: This always works. PinmemberPhilip Patrick9:22 18 Mar '02  
GeneralRe: This always works. PinmemberAnonymous7:39 6 May '02  
GeneralRe: This always works. PinsussSmashfist11:28 3 Nov '04  
GeneralBin to AscII PinmemberBenny A12:44 29 Jan '02  
GeneralViewing Source PinmemberJason Hooper11:58 29 Jan '02  
GeneralGreat Com Great Tip PinmemberBenny A11:14 29 Jan '02  
GeneralProblem using "GetSourceCode.asp" PinmemberBrenda Yip18:59 14 Jan '02  
GeneralRe: Problem using "GetSourceCode.asp" PinmemberAnonymous23:20 11 Feb '02  
QuestionProblem using GetHTML after a while? PinmemberAnders2:04 21 Oct '01  
AnswerRe: Problem using GetHTML after a while? PinmemberLuna8:29 6 Nov '01  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120209.1 | Last Updated 4 Apr 2001
Article Copyright 2001 by Dhandapani Ammasai
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid