Serving Content from a webserver

A couple of questions around downloading graphics and music post-installation from a webserver

Do I have to use PHP?

Is there a recommended method?

My thought is that the phone can check the timestamp of the file on the webserver and if it’s more recent than a timestamp of a file on the phone or if the file doesn’t exist on the phone then the phone will download and replace the content in the background. 

No, you do not have to use PHP. You can use any any language in the server side (PHP, ASP,…). 

There are a lot of posts here in the forum teaching you how to do it. Here is a link to a post by Rob Miracle also teaching how to do it:

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

Renato

The blog post, which I recommend everyone start at is important if you’re going to be doing any PHP/database work on the server.   Renato, thanks for having her check it out.

If you’re just going to be fetching files you just need to know how to use network.request() and network.download() and make sure you’ve got a good understanding on the various places you can save files to and read them from (system.DocumentsDirectory, system.ResourceDirectory, etc.)  and learning how to use LFS to get file attributes of your local files to do time comparisons.

The new networking API’s should let you do a “HEAD” request using network.request().  This will get you info about the file you want to download which includes it’s timestamp.  You can then compare that to the local file and if you need to fetch the file then use network.download() to download it.   You would need a way  let your program know if it needs to fine the file in your resource directory or your documents or caches directory.

No, you do not have to use PHP. You can use any any language in the server side (PHP, ASP,…). 

There are a lot of posts here in the forum teaching you how to do it. Here is a link to a post by Rob Miracle also teaching how to do it:

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

Renato

The blog post, which I recommend everyone start at is important if you’re going to be doing any PHP/database work on the server.   Renato, thanks for having her check it out.

If you’re just going to be fetching files you just need to know how to use network.request() and network.download() and make sure you’ve got a good understanding on the various places you can save files to and read them from (system.DocumentsDirectory, system.ResourceDirectory, etc.)  and learning how to use LFS to get file attributes of your local files to do time comparisons.

The new networking API’s should let you do a “HEAD” request using network.request().  This will get you info about the file you want to download which includes it’s timestamp.  You can then compare that to the local file and if you need to fetch the file then use network.download() to download it.   You would need a way  let your program know if it needs to fine the file in your resource directory or your documents or caches directory.