Help with MySQL and PHP with my project
Posted: Thu Dec 02, 2004 9:57 pm
Hello all again:
We are constantly working to improve my sight, but before I get too carried away, let me try to explain why I think a DB may be the answer, but the one caveat is I have never made a MySQL DB so I would need a lot of coaching... so other ideas are welcome!
First, let me just say that this forum has been helpful getting the site this far! We are a webcasting sight using Shoutcast and have a custom "class" that parses XML from the SC server. We have taken that data and put it in tables and made it look very nice indeed! Now our focus is on our error messages which currently display by array position of an array called shoutcast[0] which is server 1, and shoutcast[1] which is server 2. While the SC server is up there is one error which states that there is no stream. Like:
"There is no stream on Server 0"
which goes onto the webpage when the DSP is not pushing songdata or the stream name etc.
Then if the SC server is completely offline, we have a similar error message.
It would be immensely cool if we could retain the name of the server stream at the very least and put it someplace... cross reference when the server comes back up (ie one of the dynamic parts of the site is that we can change the stream name and have it reflect on the site without manual updating) against a DB or the like and then if the name had changed from what is stored, then it updates the records. The end result of this whole situation would be that we could then put the following by querying the DB into the webpage:
RadioTeal Obscure 80's is down for maintenance (for offline) or RadioTeal Obscure 80's is currently not streaming for the lesser error. In both cases the data is gone from the class file because the server doesn't supply any of the data that the DSP does. This is where songhistory, bitrate, genre, etc comes from. It would be nice to eventually get it to where all the data is there even if the SC server is down but not offer the listen button or request button or song history information for example.
I am clueless how to set this up in either PHP or MySQL, though the DB is probably not very complex.
just for reference, you can view the page we are working with and since my server is offline currently, the error situation we are working on at http://radioteal.no-ip.com
Your help is VERY appreciated.
Thanks,
We are constantly working to improve my sight, but before I get too carried away, let me try to explain why I think a DB may be the answer, but the one caveat is I have never made a MySQL DB so I would need a lot of coaching... so other ideas are welcome!
First, let me just say that this forum has been helpful getting the site this far! We are a webcasting sight using Shoutcast and have a custom "class" that parses XML from the SC server. We have taken that data and put it in tables and made it look very nice indeed! Now our focus is on our error messages which currently display by array position of an array called shoutcast[0] which is server 1, and shoutcast[1] which is server 2. While the SC server is up there is one error which states that there is no stream. Like:
"There is no stream on Server 0"
which goes onto the webpage when the DSP is not pushing songdata or the stream name etc.
Then if the SC server is completely offline, we have a similar error message.
It would be immensely cool if we could retain the name of the server stream at the very least and put it someplace... cross reference when the server comes back up (ie one of the dynamic parts of the site is that we can change the stream name and have it reflect on the site without manual updating) against a DB or the like and then if the name had changed from what is stored, then it updates the records. The end result of this whole situation would be that we could then put the following by querying the DB into the webpage:
RadioTeal Obscure 80's is down for maintenance (for offline) or RadioTeal Obscure 80's is currently not streaming for the lesser error. In both cases the data is gone from the class file because the server doesn't supply any of the data that the DSP does. This is where songhistory, bitrate, genre, etc comes from. It would be nice to eventually get it to where all the data is there even if the SC server is down but not offer the listen button or request button or song history information for example.
I am clueless how to set this up in either PHP or MySQL, though the DB is probably not very complex.
just for reference, you can view the page we are working with and since my server is offline currently, the error situation we are working on at http://radioteal.no-ip.com
Your help is VERY appreciated.
Thanks,