Results 1 to 40 of 66

Thread: Winsock: HTTP File Upload

Hybrid View

  1. #1

    Thread Starter
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Winsock: HTTP File Upload

    You need to authenticate yourself using NTLM (Microsoft Windows NT LAN Manager) authentication. It is possible to do this in VB but involves a lot of byte shifting and code.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  2. #2
    Junior Member hellilyntax's Avatar
    Join Date
    Jun 2006
    Location
    Kedah, Malaysia
    Posts
    28

    Re: Winsock: HTTP File Upload

    thanks 4 ur reply visualAd,
    pls gimme more detail, how to do so..in policy setting?
    im using winxp as webserver(just for development)..

    im going to host my webserver at hosting company...
    what do i need to tell them to do?

    ill buy u a pasta then..hehe..

  3. #3

    Thread Starter
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Winsock: HTTP File Upload

    Quote Originally Posted by hellilyntax
    thanks 4 ur reply visualAd,
    pls gimme more detail, how to do so..in policy setting?
    im using winxp as webserver(just for development)..

    im going to host my webserver at hosting company...
    what do i need to tell them to do?

    ill buy u a pasta then..hehe..
    NTLM is a challenge response protocol. That means the client needs to make a connection containing a challenge and the server makes the response. No user name and password are ever transmitted to the server - the authentication takes place with the domain controller.

    Like I say. I have never written an NTLM authenticator in VB and I do not plan to either. That doesn't mean the its not possible, just that its a complex and time consuming task.

    If you want to do it yourself here is a detailed specification.

    http://curl.haxx.se/rfc/ntlm.html
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4
    Junior Member hellilyntax's Avatar
    Join Date
    Jun 2006
    Location
    Kedah, Malaysia
    Posts
    28

    Re: Winsock: HTTP File Upload

    thanks a lot visualAd,
    it sound quite hard for that coding...
    me either didnt plan to do so...hehe...

    im better choose another solution...
    im planning to update my sql server directly from my vb local client instead of upload the file then update at the server.

    which one is better in terms of reliability?

  5. #5
    New Member
    Join Date
    Aug 2006
    Posts
    1

    Re: Winsock: HTTP File Upload

    Hi All,
    problem
    look at the picture
    Attached Images Attached Images  

  6. #6
    New Member
    Join Date
    Apr 2008
    Posts
    1

    Thumbs up Re: Winsock: HTTP File Upload

    Quote Originally Posted by hellilyntax
    thanks a lot visualAd,
    it sound quite hard for that coding...
    me either didnt plan to do so...hehe...

    im better choose another solution...
    im planning to update my sql server directly from my vb local client instead of upload the file then update at the server.

    which one is better in terms of reliability?
    Hi, If you want add support for http authentication you could add that line in the source:
    Code:
        ' construct the HTTP request in the form:
        '
        ' POST /path/to/reosurce HTTP/1.0
        ' Host: host
        ' Content-Type: multipart-form-data, boundary=boundary
        ' Content-Length: len(strbody)
        '
        ' HTTP request body
        strHttp = "POST " & DestUrl.URI & "?" & DestUrl.Query & " HTTP/1.0" & vbCrLf
        strHttp = strHttp & "Host: " & DestUrl.Host & vbCrLf
        ' HTTP Authentication LINE BELOW HERE
        strHttp = strHttp & "Authorization: Basic YWRtaW4xNDptdXNpd2ViMDMwNg==" & vbCrLf
        strHttp = strHttp & "Content-Type: multipart/form-data, boundary=" & strBoundary & vbCrLf
        strHttp = strHttp & "Content-Length: " & lngLength & vbCrLf & vbCrLf
        strHttp = strHttp & strBody
    
        BuildFileUploadRequest = strHttp

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