Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to Export Data From an App & Display It on a Website

  1. Jan 21, 2016 #1
    Hello,

    Beginner here so take it easy. I am building a basic hybrid-platform app using Smartface (a similar platform to Phongap). For purposes of this discussion, the app will do something very basic: you click the start button and it will start counting down from 30 minutes to 0, and when you reach 0 you get 1 star. You can do this multiple times in a day. The more 30-minute sessions you complete, the more stars you get.

    What I would like to do is have those stars exported and displayed on a webpage. In other words, I would like the user to browse to that website and see how many stars were collected over a day.

    Now what is the easiest way to do this? I have been looking into the Parse platform, and into some of the authentication services out there. I also have a hosting package that includes MySQL and a decent amount of storage/bandwidth.

    Without diving into complex discussions of building a backend infrastructure, what is the simplest way to export this very basic data and simply display it on a webpage?

    Thanks in advance.
     
  2. jcsd
  3. Jan 21, 2016 #2
    Storing the data in mySQL and displaying it using something like PHP would be fairly easy depending on the tools you have available for developing your app. However why even introduce the browser? Just have it stored locally in the app.
     
  4. Jan 21, 2016 #3
    To expand a bit on what Greg said, an super easy (and insecure) way would be to set up the app to send the information via a get request to a web url.
    Something like www.yousite.com/postStar.php?id=123

    then have a little snippet of php code which will insert the data into a webpage

    It's insecure as what prevents people from generating their own requests?
    You can make it a bit more secure by having the app generate codes, but with anything if someone is motivated they'll figure a way to break through :)
     
  5. Jan 23, 2016 #4
    Thank you both! This explains things a little better!
     
  6. Jan 23, 2016 #5
    In addition to whats been said, JSON is the way to send data from javascript (phonegap) apps seemlessly to PHP. Google it and see how easy it is.
     
  7. Jan 23, 2016 #6
    Isn't PHP notoriously insecure?
     
  8. Jan 23, 2016 #7
    https://www.quora.com/What-are-the-top-10-websites-built-with-PHP [Broken]... Ive been away from web development for awhile, but unless something new has come up, its pretty trusted.
     
    Last edited by a moderator: May 7, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How to Export Data From an App & Display It on a Website
Loading...