Thanks, Sarah,

To complicate this I will be writing these files from within an LC app from 
different clients computers so that each clients app will create (if not 
present) a folder for them and then write a prefs text file, a text file and 
some images.

I guess I can look into an iRev file. I just didn't get very far in 
understanding the 'best' ways to go about that.

Thank you for looking into this for me.

-- Tom McGrath III
http://lazyriver.on-rev.com
[email protected]

On May 1, 2011, at 5:11 AM, Sarah Reichelt wrote:

> Tom, you cannot write directly to a server.
> You can upload a file using your FTP login details.
> But the best solution for your case is to have an irev file on the server 
> that you can call using http://.... And send some data to via POST or GET. 
> Then have the irev file do the actual writing.
> 
> Not at my Mac right now, so can't give actual examples, but here is the 
> process in untested code:
> 
> In your script on the desktop:
> 
> put "http://tom.on-rev.com/writeData.irev"; into tURL
> put "data=" & urlEncode(tDataToWrite) into tPostData
> post tPostData to URL tURL
> 
> 
> In the writeData.irev file on the server:
> 
> put $_POST["data"] into tNewData
> put tNewData into URL ("file:dataFile.txt")
> 
> Images will work the same way, but you need to read in the data using 
> binfile:, not file:
> Then base64encode the binary data before POSTing it.
> 
> Cheers,
> Sarah
> 
> 
> Sent from my iPad
> 
> On 01/05/2011, at 1:58 AM, Thomas McGrath III <[email protected]> wrote:
> 
>> I need to know how to write to on-rev from within an iOS app.
>> 
>> Is there a best practices around?
>> 
>> I need to write a folder to my account and then write a text file and some 
>> images.
>> 
>> Are there any sample stacks that show this?
>> 
>> Is it as simple as put img 1 into url "http://etc.";
>> 
>> or is this something for libURL? ( I haven't used libURL before)
>> 
>> Any guidance appreciated.
>> 
>> -- Tom McGrath III
>> http://lazyriver.on-rev.com
>> [email protected]
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> [email protected]
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to