Post URL denied

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Zood
Posts: 37
Joined: Mon Apr 24, 2017 7:17 pm

Post URL denied

Post by Zood » Tue May 01, 2018 12:51 pm

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!

Klaus
Posts: 11103
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Post URL denied

Post by Klaus » Tue May 01, 2018 2:27 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6786
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Post URL denied

Post by FourthWorld » 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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Zood
Posts: 37
Joined: Mon Apr 24, 2017 7:17 pm

Re: Post URL denied

Post by Zood » Wed May 02, 2018 10:47 am

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!

Klaus
Posts: 11103
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Post URL denied

Post by Klaus » Wed May 02, 2018 11:06 am

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

Zood
Posts: 37
Joined: Mon Apr 24, 2017 7:17 pm

Re: Post URL denied

Post by Zood » Thu May 03, 2018 1:00 am

Alright, thanks! switching to sql

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6786
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Post URL denied

Post by FourthWorld » Thu May 03, 2018 3:08 am

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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply

Return to “Databases”