Use Ajax to send a file to my web space

Get help using Construct 2

Post » Sat Jul 05, 2014 2:50 pm

I would like to create an Array.asJSON file and upload it to my webspace.

Having created the Array.asJSON file i have manually uploaded it to my web space. Then using Ajax i have downloaded the file and filled the array, all fine :) .

The one thing i cant seem to figure out is how to use Ajax to send the file back to my webspace overwriting the original file.

I did try this.. but it doesnt work. Too easy i suppose :)

ps. forgot to say i am using Node-webkit but i dont suppose that makes any difference.

Thanks
You do not have the required permissions to view the files attached to this post.
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Sat Jul 05, 2014 5:05 pm

Well it seems from what i can gather i need some sort of PHP code on my site. I dont want to use the data on my site so it doesnt need to be parsed or loaded into a database. I just want to store the Array.asJSON file itself on the webspace so it can be read from and updated.

I know this is not the place to ask about PHP etc but i really dont know what terms i should be searching for.
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Sat Jul 05, 2014 5:14 pm

I'm just learning this stuff myself, so yes, you need to create PHP scripts to deal with your data as you post it to and from your server. I can't help at all with Node-Webkit though as I've never used it, but I am just learning PHP myself and it's a very easy language, just different syntax and flow. A few days of tutorials is all you need for this basic stuff, though I'm thinking of having my entire game processed on my server, so might even develop the whole thing in PHP (it's a turn-based game) and just use C2 for the player front-end.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633


Return to How do I....?

Who is online

Users browsing this forum: DevinMurray, ezgaming420, marcinkowski, Yahoo [Bot] and 2 guests