Results 1 to 22 of 22

Thread: Posting a local file to my web server

Threaded View

  1. #10
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Posting a local file to my web server

    this isnt sending a file but shows in vbscript how to send a post to a website form .. im used to using GET myself but same idea .. if you had access to the remote server it would make it much easier to upload the file .. but it is doable either way.

    Also see this link ..
    http://www.motobit.com/tips/detpg_uploadvbsie/

    Code:
    Option Explicit
    
    Dim strURL
    Dim objHttp
    
    On Error Resume Next
    
    strURL = "http://www.myurl.com/url-to-web-server.asp?id=thomashess"
    
    Set objHttp = WScript.CreateObject("Microsoft.XMLHTTP")
    objHttp.Open "POST", strURL, False
    objHttp.Send ""
    
    Set objHttp = Nothing
    
    If Err = 0 Then
    	MsgBox "Data Sent"
    Else
    	MsgBox "Error" & vbCrLf & Err.Description
    End If
    Last edited by rory; Jul 3rd, 2006 at 02:48 AM.

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