WRITING TO REMOTE FILE

Hi -

Anyone know how I could use roUrlTransfer to write to a remote text file. I am just trying to write a string to a file.

mystring = “This is what I want to write to the file.”
xfer = CreateObject(“roUrlTransfer”)
xfer.SetUrl(“http://wherever.com/test.txt”)
xfer.GetToFile(“test.txt”)

I got as far as this but not sure how the actual writing occurs? How do I tell it to write my string to that file?

There is a cUrl interface in BrightScript, see page 88 of the BrightScript Component Reference, I believe you should be able to accomplish what you want with this. Of course, you need write access and permissions on the webserver configured to allow this.

  • Joel

You want PostFromString or PostFromFile.

-JT