{Edit - Corrected the GET/POST}
Well..
I can get it to draw a pretty html doc, but not post.
code:
BREAK ON
;;Dim $binaryContent
; -- http://support.microsoft.com/default.aspx?scid=kb;EN-US;q298108
; -- http://support.microsoft.com/default.aspx?scid=kb;EN-US;q296713
; -- http://support.microsoft.com/support/kb/articles/Q237/9/06.ASP
; -- http://www.bibit.com/asp_example_source_documentation.html
$user = "uid"
$password = "pass"
$address = "ftp://site.com/kdyer"
$rdir = "/kdyer"
$file = "C:\untitled1.jpg"
$ftpobj = CreateObject("microsoft.xmlhttp")
IF @error <> 0
?@error
SLEEP 2
EXIT 1
ENDIF
;;$ftpobj.open("POST", $address, FALSE, $user, $password)
; -- http://www.planet-source-code.com/xq/ASP/txtCodeId.5746/lngWId.1/qx/vb/scripts/ShowCode.htm
$ftpobj.open("GET",$address,not 1)
$ftpobj.send
$strCookie = $ftpobj.getResponseHeader("set-cookie")
$strCookie = Left($strCookie, InStr($strCookie, ";") - 1)
;better check the feedback
$testresl = $ftpobj.responseText
?$testresl
;do the actual send
$ftpobj.open("POST", $address+$rdir, not 1, $user, $password)
$ftpobj.setRequestHeader("Cookie", $strCookie)
;we need to do it a second time due to K
; B article Q234486.
$ftpobj.setRequestHeader("Cookie", $strCookie)
$ftpobj.setrequestheader("MIME-Version", "1.0")
$ftpobj.setRequestHeader("Depth", "0")
; -- Think we need to do something like
; -- http://support.microsoft.com/default.aspx?scid=kb;en-us;Q298108
; -- Re. Lvarbin
;$ftpobj.send($file) ; -- If we comment out this line we can see the site
$ftpobj.send $file
$testres = $ftpobj.responseText ; -- this actually draws the FTP Site :)
?$testres
?"Press a key"
get $
I am pretty trashed.. Time for rest..
Added in a note about Lvarbin: where I think we need to convert to binary data before posting.
Hmmm..
Kent
[ 03. December 2002, 09:39: Message edited by: kdyer ]