| Dart Home | PowerTCP Web for ActiveX | Custom Development | Reply | PowerTCP Web for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web for ActiveX Topic: Probblems with retrieval of page contents |
| User865 Posts: 2 Member Since: 03/05/01 |
posted March 5, 2001 5:41 AM Could you please help me to retrive the contents of a web page using dart.htp.1 and dart.dartstring objects the program and output are hereunder: Program: <% Option Explicit Dim m_scontent, http1, i, m_sheader Sub ShowContent() ' Convert LF's to CRLF's to allow viewing in textbox m_sContent = Replace(m_sContent, vbCrLf, "qzqz") m_sContent = Replace(m_sContent, vbLf, vbCrLf) m_sContent = Replace(m_sContent, "qzqz", vbCrLf) response.write CStr(m_sContent) End Sub set m_sheader = Server.CreateObject("Dart.DartStrings.1") m_sheader.Clear set Http1 = server.createobject("dart.http.1") Http1.Timeout = 60000 'm_sheader.clear http1.proxy = "172.20.38.15:3128" http1.proxyUsername="m" http1.proxypassword="p" 'http1.proxybypass = "www.techsolutions.co.za" 'Http1.Scheme ="http" 'Http1.UrlRemoteHost ="" Http1.Url = "http://www.intekom.co.za" 'Http1.head m_sheader 'm_sHeader.Delimiter = vbCrLf ' response.write m_sHeader.All Http1.Get m_scontent, m_sHeader response.write "STATE: " + CStr(Http1.State)+ "<BR>" 'response.write Len(Cstr(m_scontent)) + "<BR>" response.write m_sheader.All 'Http1.head m_sheader showcontent 'response.write data %> OutPut: STATE: 0 ETag: "68025-127a-38218073" Content-Length: 4730 Content-Type: text/html X-Cache: HIT from wto Last-Modified: Thu, 04 Nov 1999 12:47:47 GMT |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted March 5, 2001 7:23 AM Try setting m_sContent = "" before passing it to get. This assures that the data type of the Variant is VT_BSTR. Hope this helps! Tony Priest Dart Tech Support |
| Reply | PowerTCP Web for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|