Getting a URL is working, but not the put -- trying to write to a web file. Troubleshooting needed.

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Mon Jun 25 15:05:49 EDT 2012


Hi Mark,

someone might correct me, but i am pretty sure it is not possible to put something into an  http url.

And open file only works with files in a local file system.

So if you want to write into a file on the web you can either use ftp.

example:
 put "Hello from LiveCode" into URL "ftp://yourftpserver.com/yourpath"

or with ftp username and password
 put "Hello from LiveCode" into URL "ftp://ftpusername:ftppassword@yourftpserver.com/yourpath"

But, as already mentioned by others in an other discussion, ftp is not secure.

Other possibility is to post data into an url. This data then is processed by a script, which writes the data to the file.

Regards,

Matthias

Am 25.06.2012 um 18:37 schrieb Mark Rauterkus:

> Hi,
> 
> Newbie:
> 
> This works in a button:
> 
> on mouseUp
>   put URL "http://www.Rauterkus.com/dreamers/2012/here.html" into
> field "URL_Catcher"
> end mouseUp
> 
> But this does not work in a button -- showing all the failures in all
> sorts of ways.
> 
> on mouseUp
>   --   open file URL "http://Rauterkus.com/dreamers/2012/here.txt"
>   --   put "Hello from LiveCode" into URL
> "http://Rauterkus.com/dreamers/2012/here.txt"
>   --   close file URL "http://Rauterkus.com/dreamers/2012/here.txt"
> 
>   -- not working with permissions at 666
>   --put field "URL_Catcher2" into URL
> "http://Rauterkus.com/dreamers/2012/here.txt"
> 
>   --not working with permissions at 666
>   --put field "URL_Catcher2" into line 1 URL
> "http://Rauterkus.com/dreamers/2012/here.txt"
> 
>   -- not working testing at permissions 666:
>   -- put "LiveCode lives" into URL
> "http://Rauterkus.com/dreamers/2012/here.txt"
> 
>   -- testing failed when there was NOT a file already created.
>   --   open file URL "http://Rauterkus.com/dreamers/2012/here.txt"
>   --   put "LiveCode lives" into URL
> "http://Rauterkus.com/dreamers/2012/here.txt"
>   --   close file URL "http://Rauterkus.com/dreamers/2012/here.txt"
> 
>   -- not working -- MR Moved PERMISSIONS on the web for the here.text
> file to 777
>   -- put "LiveCode lives" into URL
> "http://Rauterkus.com/dreamers/2012/here.txt"
> 
>   open file URL "http://Rauterkus.com/dreamers/2012/here.txt"
>   put "LiveCode lives" into URL "http://Rauterkus.com/dreamers/2012/here.txt"
>   close file URL "http://Rauterkus.com/dreamers/2012/here.txt"
> 
> 
> end mouseUp
> 
> 
> The file Permissions were changed to most liberal:
> 	 -rwxrwxrwx (777)
> 
> Before they were 666 too.
> 
> 
> 
> 
> 
> --
> Ta.
> 
> 
> Mark Rauterkus       Mark.Rauterkus at gmail.com
> PPS Summer Dreamers' Swim and Water Polo Camp Head Coach with
> Neighborhood Learning Alliance
> 
> http://NeighborhoodLearning.org
> 
> http://Rauterkus.blogspot.com
> http://FixPA.wikia.com
> http://CLOH.wikia.com
> 412 298 3432 = cell
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list