Results 1 to 2 of 2

Thread: Download a file using Inet or Winsock

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    8

    Download a file using Inet or Winsock

    Hi All,

    I want to download an mp3 file in my vb6 app using Inet or Winsock.
    This mp3 file must be stored on the harddisk of the computer
    (can be app's root directory, app.path)

    i tried this with winsock, but it seems that i can't download the whole file. But when i want to save it using the common OPEN filename FOR OUTPUT AS #1 vb puts " " marks around the data.
    now an mp3 player (winamp) can't open the audio stream.

    so i thought.. maybe it can be done with Inet, but i know nothing about that control.. can someone help me.. ????

    thnxx,

    Jeroentjuuh

  2. #2
    Lively Member Liquid Pennies's Avatar
    Join Date
    Jun 2002
    Location
    Charlotte, NC
    Posts
    124
    uh, well. Stick with winsock. dont use "for output" instead, transfer the file in bytes, put it in an array and then use this:

    VB Code:
    1. Dim TempByte() as byte
    2. Open "C:\MyMusic.mp3" For Binary As #1
    3.         Put #1, , TempByte()
    4. Close #1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width