Quote:
Originally Posted by Nicov
Hello.
I am making a app where I will give the user the opputunity to send in his Name, a category and some text to me. Then I can approve this text and put it in the app. Example: I have an App which have jokes on it. I Give the user the opportunity to write jokes to me, which i can approve and launch to the app.
How do I do this? Is it possible for the entered text to be send to my email, or a MySQL database?
Anyone have some suggestions?
|
Mail would work, and be pretty easy to implement, but it would not be a great user experience. The user would have to use the mail composer view, and click send in order to send you the email.
It would probably be better to have a server running on a hosting service that accepts files through an HTTP put, or a PHP script.
The open source ASIHTTPRequest framework makes it easy to do HTTP puts and gets. I haven't used it, but I've skimmed the documentation, and it seems to make it easier than using the raw system tools.
The bigger challenge is writing the server-side code to parse the incoming data (jokes) and package them up for the app.
You'd also need a mechanism for delivering the updated database to the user. A PHP script would be perfect for this. You could use a timestamp on your app that would remember the last date you were updated, and the host could be written to only send down the records that had been added/changed since that date, to reduce the amount of time required for updates.
I'd suggest buying a book on PHP/MySQL servers. That's way beyond the scope of a forum post.
Bear in mind that you will need to run this server with a static IP address, on a system that has 24/7 up-time. That usually means renting space on a hosting service, which will mean you have to spend money every month to maintain your app. (our company looked into it, and found that most ISPs here in the US want $100/month at a minimum just for a static IP address. Hiring a hosting service is more economical, because they can spread the hosting costs like network capacity, battery backup, redundant computers, data backup and recovery, etc. across lots of customers.) You should make sure you get enough continuing revenue from your app to pay that continuing cost. If you get thousands of sales initially, and then no sales at all after a while, how will you pay for your server costs after 2 years? What about 5 years?