Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have to capture the response of url in a string without viewing the page.

f.e. navigate(url) show the page i've to call the url storing the information in a string
 
Hmmm...not sure exactly what you mean here. Do you mean that I am submitting a form on a page using method=Get and you want to capture that information but you want to redirect me to another page?
 
i want to do the streaming of the page, like view source in the menu of ie
 
This is some code from an ASP book for viewing the source of a file. You can see if you can modify it for what you want.


<%
Const ForReading = 1, ForAppending = 8, ForWriting = 2
Const TriStateUseDefault = -2, TriStateTrue = -1, TriStateFalse = 0
Dim strPathInfo, strPhysicalPath
strPathInfo = Request.QueryString(&quot;FileName&quot;)
strPhysicalPath = Server.MapPath(strPathInfo)

Dim objFSO, objFile
Set objFSO = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set objFile = objFSO.GetFile(strPhysicalPath)
%>
<html>
<head>
<title><%=objFile.Name%> Source Code</title>
</head>

<body>
Source code for <%=objFile.Name %><hr><p>
<font face=Courier size=2>

<%
Dim objFileTextStream
Set objFileTextStream = objFile.OpenAsTextStream(ForReading, TriStateUseDefault)

Dim strLine
Do While objFileTextStream.AtEndOfStream <> True
strLine = Server.HTMLEncode(objFileTextStream.ReadLine)
strLine = Replace(strLine, Chr(9), &quot;    &quot;)
Response.Write strLine
Response.Write &quot;<br>&quot; + vbCRLF
Loop
objFileTextStream.Close
%>
</font>
<br>
<br>
<br>
<a href=&quot;<%=strPathInfo %>&quot;>Return to Displayed File</a>
</body>
</html>



Hope this helps.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top