Jump to content

A question to the Wise...


justin007

Recommended Posts

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.. :confused:

 

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.