justin007 Posted May 1, 2013 Share Posted May 1, 2013 Dear knowledgeable people... I am a complete novice when it comes to coding so to begin with I would like your help in answering a question that relates to the structure of which my project needs to proceed.. The basics are: I have a piece of audio broadcasting software. The software plays music to whoever wants to listen across the net. When a song is played the software updates a MYSQL database. The information that is sent to the database consists of data such as “song name” “artist” etc.. etc.. What I would like to do: I would like this information to be sent to my web page (yet to be designed) and it be updated when a change is made to the database (I.e. upon a song change) or updated at logical times (maybe every 15 seconds).. either way it is important that the user viewing the web page does not have to refresh the page to see the new results from the database. My understanding: The way I understand it is that … MYSQL stores the information created by the broadcasting program. Then I need a PHP script to take this information and store it in a logical way on my server. Next I need some form of JAVA to take this information and place it onto the web page for the user to view. (I also believe that I need Java as it enables real-time updates without the need to refresh the page manually) That is about as far as I have got.. What I would really like is for someone to explain if this process is correct so I can go about learning the programming languages in a structured way.. What do I already know... I have a server set-up It has, MYSQL+PHP+APACHE all running and I can access these programs/services. I have managed to copy/destroy and paste other peoples PHP work and I am able to get information from the MYSQL database.. i.e. “the most recently played song” and “the last 6 played songs” and display them on screen. Where do I go from here?. Am I right in thinking that this structure is correct... How big is this can of worms.. I hope you can find the time to help me head in the right direction.. regards Justin.. Quote Link to comment https://forums.phpfreaks.com/topic/277513-a-question-to-the-wise/ Share on other sites More sharing options...
justin007 Posted May 1, 2013 Author Share Posted May 1, 2013 And after reading the rules ... i have just broken every one of them... Sorry.. Quote Link to comment https://forums.phpfreaks.com/topic/277513-a-question-to-the-wise/#findComment-1427616 Share on other sites More sharing options...
DavidAM Posted May 1, 2013 Share Posted May 1, 2013 You can use PHP to retrieve the data from the database and generate a page when requested by the user. There is no real reason to store the data on your server separately for PHP. For the automatic refresh you can use JavaScript (which is different from Java) and AJAX (Asynchronous Javascript And XML). Start by building the page to be viewed using PHP to generate the HTML sent to the browser. Once you have that working. It will be fairly easy to add the JavaScript (to the HTML) for the AJAX calls to get the updates (based on a timer). Quote Link to comment https://forums.phpfreaks.com/topic/277513-a-question-to-the-wise/#findComment-1427632 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.