;;posts form with file field (userfile) str s sr
s.getfile("$desktop$\test.txt")
s-"--7d23542a1a12c2[]Content-Disposition: form-data; name=''userfile''; filename=''test.txt''[]Content-Type: text/plain[][]"
s+"--7d23542a1a12c2--[]" IntPost "http://www.nightchatter.com/uploader.php" s sr "Content-Type: multipart/form-data; boundary=7d23542a1a12c2" out sr
;Posts web form data. At first, call Connect.
;Returns 1 on success, 0 on failure.
;action - script's path relative to server.
;frmdata - urlencoded string. To urlencode, use str.escape.
;responsepage - if used, is populated with contents of response page (html).
;headers - additional headers. Default: "Content-Type: application/x-www-form-urlencoded"
I don't know, maybe the image should be encrypted using base64 algorithm, and "Content-Transfer-Encoding: base64" header added, like in email messages.
str s sh sr
s.getfile("$desktop$\test.txt") ;s.getfile("$qm$\winapiqm.txt")
s-"--7d23542a1a12c2[]Content-Disposition: form-data; name=''userfile''; filename=''test.txt''[]Content-Type: text/plain[][]"
s+"--7d23542a1a12c2--[]"
sh="Content-Type: multipart/form-data; boundary=7d23542a1a12c2[]"
if(!useIE) ,IntPost "http://www.nightchatter.com/uploader.php" s sr sh else ,VARIANT v vh ,vh=sh ,ARRAY(byte) a.create(s.len+1) ,memcpy(&a[0] s a.len) ,v.attach(a) , ,int h=win ,SHDocVw.InternetExplorer b._create ,act h ,b.Navigate("http://www.nightchatter.com/uploader.php" @ @ v vh) ,;b.Navigate("http://www.google.com") ,1 ,rep() 0.1; if(!b.Busy) break ,MSHTML.IHTMLDocument2 doc=b.Document ,sr=doc.body.innerText
str s sh sr
s.getfile("$desktop$\test.png")
s.encrypt(4)
s-"--7d23542a1a12c2[]Content-Disposition: form-data; name=''userfile''; filename=''test.png''[]Content-transfer-encoding: base64[]"
s+"--7d23542a1a12c2--[]"
sh="Content-Type: multipart/form-data; boundary=7d23542a1a12c2[]"
if(!useIE) ,IntPost "http://www.nightchatter.com/uploader.php" s sr sh else ,VARIANT v vh ,vh=sh ,ARRAY(byte) a.create(s.len+1) ,memcpy(&a[0] s a.len) ,v.attach(a) , ,int h=win ,SHDocVw.InternetExplorer b._create ,act h ,b.Navigate("http://www.nightchatter.com/uploader.php" @ @ v vh) ,1 ,rep() 0.1; if(!b.Busy) break ,MSHTML.IHTMLDocument2 doc=b.Document ,sr=doc.body.innerText