Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: Download a binary file
User412

Posts: 3
Member Since: 09/17/00
posted November 22, 2001 1:57 AM

Hi

How can I download a binary file off the internet?

Thanks
Manuj
twlai4

From: NIL, NE Haiti
Posts: 3
Member Since: 12/15/04
posted December 15, 2004 11:47 PM

I am not so familiar with the operation of the tools, I am also having difficulties in downloading a binary file to a local file via http using the PowerTCP Web Tool.

Does anyone could teach me?

Thanks.
twlai4

From: NIL, NE Haiti
Posts: 3
Member Since: 12/15/04
posted December 16, 2004 12:24 AM

I executed the following codes:
    Dim m_oRequestHeader As New DartSock.DartStrings
    Dim m_sContent As String = " "
    Dim m_oResponseHeader As New DartSock.DartStrings
    Dim bAns As Boolean
    m_oRequestHeader.Add("Referer: http://www.pilotwarez.com")
    Http1.Url = "http://www.pilotwarez.com/download.php?palmpass.zip"
    Http1.GetEx(m_oRequestHeader, m_sContent, m_oResponseHeader)

Then how should I write the m_sContent to the local machine? I tried,

    Dim sw As StreamWriter
    'filestream object declration (for file system operation like creating file,opening file etc)
    Dim fs As FileStream
    fs = New FileStream(Directory.GetCurrentDirectory & "\" & "palmpass.zip", FileMode.Create)
    'initializing stream writer
    sw = New StreamWriter(fs)
    'writing textbox data to streamwriter stream
    sw.WriteLine(m_sContent)
    'closing stream writer object and filesystem object
    sw.Close()
    fs.Close()

but it doesn't work for me, the file outcome is corrupted.

Any help would be very graceful!! Thanks!!
twlai4

From: NIL, NE Haiti
Posts: 3
Member Since: 12/15/04
posted December 16, 2004 2:16 AM

the problem has been solved, thx for any attention!!
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX