Results 1 to 8 of 8

Thread: upload file in host

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    13

    Question upload file in host

    Hi, please help me upload file to my hosting
    Last edited by Shaggy Hiker; Apr 29th, 2018 at 09:46 AM. Reason: Removed links

  2. #2
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    673

    Re: upload file in host

    you can search winsock upload .or winhttp.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: upload file in host

    Those links didn't seem useful to the question. If you have an issue with uploading a file to your hosting site, what is the issue? The files don't matter.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    13

    Re: upload file in host

    Please complete the following source for uploading zip files to your hosting

    Code:
    Private Sub Command1_Click()
    On Error Resume Next
    WebBrowser1.Silent = True
    WebBrowser1.Navigate ("http://address/CMD_LOGIN")
    Do While WebBrowser1.ReadyState <> "4"
       DoEvents
       Loop
    WebBrowser1.Document.Forms(0).elements("username").Value = "username"
    WebBrowser1.Document.Forms(0).elements("password").Value = "password"
    WebBrowser1.Document.Forms(0).submit
    WebBrowser1.Navigate ("http://address/HTM_FILE_UPLOAD?path=/")
    'Do While WebBrowser1.ReadyState <> "4"
    '   DoEvents
    '   Loop
    
    
    End Sub
    Last edited by si_the_geek; May 7th, 2018 at 08:27 AM. Reason: replaced username etc

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: upload file in host

    http://www.vbforums.com/showthread.p...65#post4526665

    have a look at the example to see if it can suit your requirements
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  6. #6
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: upload file in host

    I hope those aren't your actual login credientials you posted there. Someone could easily take them and use them nefariously. I'd get those blanked out as quick as you can. I've also notified the mods in case they can get to it before you do./


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    13

    Re: upload file in host

    Hello, please describe how to upload the file on http://up2www.com/ using the WebBrowser

    Code:
    Private Sub Command1_Click()
    On Error Resume Next
    WebBrowser1.Silent = True
    WebBrowser1.Navigate ("http://address/CMD_LOGIN")
    Do While WebBrowser1.ReadyState <> "4"
       DoEvents
       Loop
    WebBrowser1.Document.Forms(0).elements("username").Value = "username"
    WebBrowser1.Document.Forms(0).elements("password").Value = "password"
    WebBrowser1.Document.Forms(0).submit
    WebBrowser1.Navigate ("http://address/HTM_FILE_UPLOAD?path=/")
    'Do While WebBrowser1.ReadyState <> "4"
    '   DoEvents
    '   Loop
    
    
    End Sub

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: upload file in host

    using the WebBrowser
    i doubt it can be done just with the webbrowser control, file inputs are, deliberately, not able to be automated, which is why i developed the work around linked to above, which works in with the webbrowser control or internet explorer object
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

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