Page 1 of 1

Post URL denied

Posted: Tue May 01, 2018 12:51 pm
by Zood
Hey all,

Another question:
I have a database in the form of several .csv files on my dropbox, it all works well but I want them on my own domain.
I can load and read the files I had put on my domain just fine but I can't get to write to them...
I have set the permissions for the files to all (write, read and execute) and the load-function goes perfectly.
When I use this:

Code: Select all

 
 put "http://www.myDomain.com/test/myFile.csv" into myUrl
 Post "This is a test!" to url myUrl
 answer the result
 
The result returns empty, as if it was successful but the actual file is not changed

Any ideas/suggestions?
Thanks in advance!

Re: Post URL denied

Posted: Tue May 01, 2018 2:27 pm
by Klaus
Hi Zood,

not sure I get this...?
CSV is just a TEXT file and no CGI or something, so what are you exspecting?

You POST data to a CGI, which is a little app on the server written in ASP, PHP or LC server script, which will process the posted data. But as mentioned above, CSV is just TEXT and so nothing will ever happen here!?


Best

Klaus

Re: Post URL denied

Posted: Tue May 01, 2018 4:53 pm
by FourthWorld
Also, consider HTTPS, and some form of authentication. After all, if your program can so easily change a file on a server, anyone on the Internet can too.

Re: Post URL denied

Posted: Wed May 02, 2018 10:47 am
by Zood
Hey both,
Klaus wrote:
Tue May 01, 2018 2:27 pm
not sure I get this...?
CSV is just a TEXT file and no CGI or something, so what are you exspecting?

You POST data to a CGI, which is a little app on the server written in ASP, PHP or LC server script, which will process the posted data. But as mentioned above, CSV is just TEXT and so nothing will ever happen here!?
True, I want the CSV files to act as an online database.
The program is to handle reservations for my restaurant, so it contains the date, table nr, name etc of all my reservations.

By using the POST tData to url myUrl - function you cannot change the .csv file on the server you are saying?
FourthWorld wrote:
Tue May 01, 2018 4:53 pm
Also, consider HTTPS, and some form of authentication. After all, if your program can so easily change a file on a server, anyone on the Internet can too.
That would be my second project :)
Just starting off with a basic, then I will implement login etc

Thanks both in advance!

Re: Post URL denied

Posted: Wed May 02, 2018 11:06 am
by Klaus
Hi Zood,
Zood wrote:
Wed May 02, 2018 10:47 am
...
By using the POST tData to url myUrl - function you cannot change the .csv file on the server you are saying?
exactly, you need a server side script (PHP, ASP, JSP, Perl, LC Server etc.) to do this job.


Best

Klaus

Re: Post URL denied

Posted: Thu May 03, 2018 1:00 am
by Zood
Alright, thanks! switching to sql

Re: Post URL denied

Posted: Thu May 03, 2018 3:08 am
by FourthWorld
Zood wrote:
Thu May 03, 2018 1:00 am
Alright, thanks! switching to sql
The data storage method is separate from the server side middleware that uses it (PHP, Perl, Python, LiveCode, etc.).

And you will want that middleware, to avoid exposing the full rich language of MySQL to the open Internet.