How can I get the HTML source of any web page.
How do I Get The HTML Source of Any Web Page
Collapse
X
-
-
Sorry, I didn't explain it well.
I want to get the source code of page dynamically/problematically/through javascript etc.
below is code I tried to achieve the task but it does not and giving me error "ACCESS DENIED"
Code:<script language=javascript> var xmlHttp function DecodeThisVIN() { url = "www.XYZ.COM" xmlHttp=GetXmlHttpObject(); xmlHttp.open("GET",url,false); //This is the line where I'm getting error var getstatus = xml.status; alert(getstatus); } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } </script>Comment
-
I tried it with asp but still getting error.
Please note for above code xmlHTTP has third parameter as TRUE. In this case I get error "The data necessary to complete this operation is not yet available."Code:Dim xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open ("GET", url, true) xmlhttp.send ("") Response.write (xmlhttp.responseText) xmlhttp = nothing
If I make it "FALSE" then get error "A connection with the server could not be established "Comment
Comment