i think i am almost there with my code but i cant seem to get it to work, i have examined a number of lessons but it just wont go.
i have this
Code: Select all
put field "randomfield" into tData
## tData = the data you want to write to file2
put urlencode(tUserName) into tUN
put urlencode(tPassWord) into tPW
put tData into URL("ftp://" & tUN & ":" & tPW & "@website.com/file2.txt")
## check the rdesult!
## If empty, all is fine!
if the result <> empty then
anser "Error" && the result
end if
but i also found this on the web..
Code: Select all
on sendFTP
constant FTPHOST = "ftp://wesite.com/"
constant FTPUSER = "username"
constant FTPPASS = "password"
put field "playerField" into tFileName
# Connect the start the upload
local tDestination
put "ftp://" & FTPUSER & ":" & FTPPASS & "@" & "ftp.website.com/TC_ARCHIVE/" & tFileName into tDestination
libURLSetStatusCallback "uploadProgress", the long ID of me
libURLftpUploadFile tFileForUpload, tDestination, "uploadComplete"
end sendFTP
on uploadComplete pURL, pStatus
put "Status Update:" && pStatus && return after field 1
end uploadComplete
on uploadProgress pURL, pStatus
put "Status Update:" && pStatus && return before field 1
end uploadProgress
thanks
Darren