Getting a URL is working, but not the put -- trying to write to a web file. Troubleshooting needed.
m.schonewille at economy-x-talk.com
Mon Jun 25 14:25:42 CDT 2012
Hi Matthias and Mark,
There are in fact a few ways to use the put URL command with the http protocol. If the server supports it, you can use "put myVar into url myURL" directly and retrieve the data in PHP. Some time ago, there was a discussion about it on this mailing list. Here's some more info about handling the PUT method in PHP: http://qery.us/2ah . Unfortunately, I don't think this is very relevant for Mark R.
Another possibility is to use a PHP (or iRev or CGI) script that uses the GET method on the server. In LiveCode, you can access this with
put url ("http://www.bla.com/file.php?var=" & urlEncode(myVar))
This is a kind of cheating because it doesn't really use the PUT method but at least it uses the http protocol.
FTP is a good solution too, of course.
Economy-x-Talk Consulting and Software Engineering
Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com
On 25 jun 2012, at 21:05, Matthias Rebbe wrote:
> 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.
> put "Hello from LiveCode" into URL "ftp://yourftpserver.com/yourpath"
> or with ftp username and password
> put "Hello from LiveCode" into URL "ftp://ftpusername:email@example.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.
More information about the use-livecode