Results 1 to 5 of 5

Thread: FTP files - HELP please

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264

    Post

    I am using the INET to upload a short HTML file which I make in a VB program, from some reason, only half of it is being uploaded to the FTP

    Anyone has any idea why ?

    The line that makes the execute:

    Inet1.Execute , "PUT c:\myip.html /myip.html"

    Alon

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    New York
    Posts
    32

    Post

    What do you mean by only half of it? Is it half of the code or is not completing the transfer and giving you a corrupt file or something?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264

    Post


    What do you mean by only half of it? Is it half of the code or is not completing the transfer and giving you a corrupt file or something?
    It gives completed, but when I look at the file, it just have half of the code eg:

    the original file:

    <html>
    <head>
    <title>
    fdfgfdg
    </title>
    <body>
    fdgdfggf
    dff
    g
    d
    fg
    </body>
    </html>

    the file that is uploaded:
    <html>
    <head>
    <title>
    fdfgfdg
    </title>
    <body>
    fdgdfggf
    dff

    and that's it ... (I do get state 12 at the end)

  4. #4
    Member
    Join Date
    Jan 1999
    Location
    New York
    Posts
    32

    Post

    Hmm...I've been messing around with your problem and I've been getting some problems of my own. At first, I couldn't get it to save the HTML but i got that to work by only using 3 digits to the left of the "." I did this:
    Open "C:\webpage.htm" for output as #1
    when i did .html, it wouldn't create it. Anyway, I can't get it to ftp anything. I've been messing with protocols and making sure the url and password stuff works and it all seems to work..in theory, but it won't ftp anything. So if anyone who knows how to do this is reading this...PLEASE HELP US.
    Well, best of luck to you in fixing your program. I'll keep looking into it and i'll let you know if i get it to work. If you get it, let me know what you were doing wrong. I'd like to know.

    GreenDey

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264

    Post


    Hmm...I've been messing around with your problem and I've been getting some problems of my own. At first, I couldn't get it to save the HTML but i got that to work by only using 3 digits to the left of the "." I did this:
    Open "C:\webpage.htm" for output as #1
    when i did .html, it wouldn't create it. Anyway, I can't get it to ftp anything. I've been messing with protocols and making sure the url and password stuff works and it all seems to work..in theory, but it won't ftp anything. So if anyone who knows how to do this is reading this...PLEASE HELP US.
    Well, best of luck to you in fixing your program. I'll keep looking into it and i'll let you know if i get it to work. If you get it, let me know what you were doing wrong. I'd like to know.

    GreenDey
    With Inet1
    .Cancel
    .RemotePort = 21
    .Protocol = icFTP
    .URL = "The FTP URL"
    .UserName = "xxxx"
    .Password = "xxxx"
    End With

    Open "c:\myip.html" For Output As #1
    Print #1, "<html><head><title> My COmputer IP </title></head>"
    Print #1, "<body>"
    Print #1, "The IP:" & MyIp
    Print #1, "Name:" & ComputerName
    Print #1, "</body></html>"
    Close #1

    Inet1.Execute , "PUT c:\myip.html /yourfolder/myip.html"

    Private Sub Inet1_StateChanged(ByVal State As Integer)
    If State = icResponseCompleted Then
    Inet1.Cancel
    Unload Me
    End If
    end sub


    This is practically 90% of my code for this program, if anyone can help , please do -- thanks GreeDey, I Really Appreciate :-)

    alon

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