Jump to content

Search the Community

Showing results for tags 'shoutcast'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. Hello, I have an Internet Radio station and I use Shoutcast. I have a function that allows me to grab the song and artist information such as Del Amitri - Roll To Me and show it on my website, and automatically changing when the songs change. I show the now playing, and last three songs. I'm wondering How I can get it to also pull in album artwork from Last.FM or Amazon such as this website: BIG 106.5 - Dayton's 70s & 80s Hits (move over the black bar and drop down). You will be able to see something such that I would want to accomplish. Not sure if this merely Javascript, or if there's also PHP.. but then again, I'd think Javascript for it to automatically change when a new song plays. Here is the file I currently have setup...which pulls the information from my shoutcast stream. I would love to incorporate album art from Amazon and/or an internal database that I have setup.. Here is what the file currently looks like. I also have stuff commented out for which I am not using ATTM. It pulls the song like artist - title <!--<html> <head>--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js" type="text/javascript"></script> <script src="http://wlqtdb.com/wayne/pollstation.js" type="text/javascript"></script> <!--</head> <body>--> Now Playing on WLQT-DB: <!--<div id="currentsong"> </div>--> <span id="currentsong"></span> Recently Played: <!--<table> <tr><th>Recently Played Songs</th></tr> <tr><td><img id='prevsong1' alt=""><span id="prevsong1"></span></td></tr> <tr><td><span id="prevsong2"></span></td></tr> <tr><td><span id="prevsong3"></span></td></tr>--> <span id="prevsong1"></span> <span id="prevsong2"></span> <span id="prevsong3"></span> <!--<tr><td><span id="prevsong4"></span></td></tr> <tr><td><span id="prevsong5"></span></td></tr> <tr><td><span id="prevsong6"></span></td></tr> <tr><td><span id="prevsong7"></span></td></tr> <tr><td><span id="prevsong8"></span></td></tr> <tr><td><span id="prevsong9"></span></td></tr> <tr><td><span id="prevsong10"></span></td></tr>--> <!-- </table> Testing: <? echo "$currentsong"; ?> </body> </html>--> Any help would be greatly appreciated. As you can see with this result, I do the Current playing song, then it does the last 3 songs. Thanks
  2. I posted this in another part but I think it was the wrong forum, mods could you close the other as I'm this should be here please? I'm hoping someone can help, I'm currently working on adding some features to a Wordpress theme used on a local radio station. My query is with regards to displaying the current live show title, I have a written a php file that when processed by the title update form, updates a table in my db with the current show title (captured from the HTML form) but also captures the user id of whoever triggered the form, it then proceeds to update the Shoutcast server with the show title. The idea behind this is to allow me to display dynamic wordpress content related to the current live DJ on the site - this works and has no issues, but what id like to do now is create a page that will check if the output of the Shoutcast server title matches the table in the db, if it does, then I'd like it to echo this output, if it is different I'd like it to use the output from the SC title instead. I currently have 2 separate scripts that can output this info separately depending which is triggered but I need to combine these, (using an if / else command I'm assuming?) this is my current attempt but at the moment it doesn't seem to output the db fields and will only output the SC title from the server, regardless of the db title, it's almost as if it doesn't even acknowledge it and each time just outputs the shoutcast server info; <?php require_once('../../wp-config.php'); // open connection to WPdb require_once('sc-config.php'); // open connection to Shoutcast Server $query = "SELECT title, userID FROM sc_options where id = '0'"; $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $onAir_Title = $row[0]; $onAir_IMG = $row[1]; } $open = fsockopen("$ip","$port"); if ($open) { fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n"); $read = fread($open,1000); $text = explode(",",$read); $text = $text[6]; } else { $text="connection refused."; } $scast = $text; $scdb = $onAir_Title; if ($scdb == $scast) { echo $onAir_Title; echo get_avatar( $onAir_IMG, 96); } else { echo $text; } ?> These are the original files, they work exactly as they should apart, but for the life of me I cannot get them to work as one Shoutcast <?php $open = fsockopen("198.154.106.116","6002"); if ($open) { fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n"); $read = fread($open,1000); $text = explode(",",$read); $text = $text[6]; } else { $text="connection refused."; } ?> <?php echo $text; ?> Wordpress db output <?php require_once('../../wp-config.php'); // open connection to WP $query = "SELECT title, userID FROM sc_options where id= '0'"; $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $onAir_Title = $row[0]; $onAir_IMG = $row[1]; // output echo $onAir_Title; echo get_avatar( $onAir_IMG, 96); } ?> Just to sum it up, would I'd like to happen, is have the file load, check the title in the database row, if that matches the title being displayed by shoutcast, echo the data from the table, if the output from shoutcast is different, then echo the output from shoutcast instead, the reason being when our Live DJ's are off air, our auto dj runs which populates the server directly, so my logic is if the Shoutcast server is different from the db, it must be Auto DJ running..
  3. I'm hoping someone can help, I'm currently working on adding some features to a Wordpress theme used on a local radio station. My query is with regards to displaying the current live show title, I have a written a php file that when processed by the title update form, updates a table in my db with the current show title (captured from the HTML form) but also captures the user id of whoever triggered the form, it then proceeds to update the Shoutcast server with the show title. The idea behind this is to allow me to display dynamic wordpress content related to the current live DJ on the site - this works and has no issues, but what id like to do now is create a page that will check if the output of the Shoutcast server title matches the table in the db, if it does, then I'd like it to echo this output, if it is different I'd like it to use the output from the SC title instead. I currently have 2 separate scripts that can output this info separately depending which is triggered but I need to combine these, (using an if / else command I'm assuming?) this is my current attempt but at the moment it doesn't seem to output the db fields and will only output the SC title from the server, regardless of the db title, it's almost as if it doesn't even acknowledge it and each time just outputs the shoutcast server info; <?php require_once('../../wp-config.php'); // open connection to WPdb require_once('sc-config.php'); // open connection to Shoutcast Server $query = "SELECT title, userID FROM sc_options where id = '0'"; $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $onAir_Title = $row[0]; $onAir_IMG = $row[1]; } $open = fsockopen("$ip","$port"); if ($open) { fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n"); $read = fread($open,1000); $text = explode(",",$read); $text = $text[6]; } else { $text="connection refused."; } $scast = $text; $scdb = $onAir_Title; if ($scdb == $scast) { echo $onAir_Title; echo get_avatar( $onAir_IMG, 96); } else { echo $text; } ?> These are the original files, they work exactly as they should apart, but for the life of me I cannot get them to work as one Shoutcast <div style="Visibility: Hidden; Position: Absolute;"> <?php $open = fsockopen("198.154.106.116","6002"); if ($open) { fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n"); $read = fread($open,1000); $text = explode(",",$read); $text = $text[6]; } else { $text="connection refused."; } ?> </div> <?php echo $text; ?> Wordpress db output <?php require_once('../../wp-config.php'); // open connection to WP $query = "SELECT title, userID FROM sc_options where id= '0'"; $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $onAir_Title = $row[0]; $onAir_IMG = $row[1]; // output echo $onAir_Title; echo get_avatar( $onAir_IMG, 96); } ?> Just to sum it up, would I'd like to happen, is have the file load, check the title in the database row, if that matches the title being displayed by shoutcast, echo the data from the table, if the output from shoutcast is different, then echo the output from shoutcast instead.
×
×
  • 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.