gibi dusuncelerı olanlar lutfen yardımlarınızı esirgemeyin... sunu ıstıyorum radyo programıyla çalan parçamızı sıtemızde kayan yazı sekılde gostermek ıstıyorum ?
Radyoda çalan parçayı sitede göstermek
6
●7.259
- 30-03-2010, 12:26:29Üyeliği durdurulduArkadaşlar herkez s.a radyo sitesi açacamda bır uygulama ıstıyorum bunu nasıl yaparim acaba elınde kodları olan yok ben yaparım elimemi bılaşacak
gibi dusuncelerı olanlar lutfen yardımlarınızı esirgemeyin... sunu ıstıyorum radyo programıyla çalan parçamızı sıtemızde kayan yazı sekılde gostermek ıstıyorum ?
- 30-03-2010, 13:49:58shoutcasttan botla çekebilirsin..
http://forum.ceviz.net/php/42128-sho...-ve-sarki.html
burda php kodu vermişler - 30-03-2010, 21:50:22Üyeliği durdurulduhocam ben bısey anlamadım
bı yardımcı olurmusun php bılgım yok ondandır
- 31-03-2010, 09:22:49onlinerapmuzo adlı üyeden alıntı: mesajı görüntüle
<meta http-equiv="content-type" content="text/html; charset=iso-8859-9" /> <?php $index = 1; global $bgcolor2; ///////////////////////// // SECTION 1 :: CONFIG // ///////////////////////// error_reporting (E_ALL ^ E_WARNING ^ E_NOTICE); //Radyonuzun ayarlarını Girin $shout_server = "ip numara yaz"; $shout_port = "port no yaz"; $shout_password = "radyonun sifresini yaz"; //Set this to whatever the bitrate you are streaming at is ( BitraTE yAYIN Kalitesi) $bitrate="96"; //Default Album Cover //$default_album_cover=""; //Stream Name $streamname=""; ////////////////////////////////////// // SECTION 2 :: CONNECT AND RECEIVE // ////////////////////////////////////// $shout_socket = fsockopen ($shout_server, $shout_port, $errno, $errstr,30); if (!$shout_socket) { echo "Error: Radio is currently unavailable(Yayın Yok)"; } else { $xml_load = ""; // Let's say hello fputs ($shout_socket, "GET /admin.cgi?pass=".$shout_password."&mode=viewxml HTTP/1.1\nUser-Agent:Mozilla\n\n"); // Now get the XML while (!feof($shout_socket)) { $xml_load .= fgets ($shout_socket, 1000); } } if ($shout_socket) { ////////////////////////////// // SECTION 3 :: PERPARE XML // ////////////////////////////// // For my own sanity, I'm getting OUT of XML here, replacing tags with [ ] brackets, so that // <SONG> becomes [SONG], etc... $xml_load = strtr ($xml_load, '<', '['); $xml_load = strtr ($xml_load, '>', ']'); $tag_separated = explode ("]", $xml_load); foreach ($tag_separated as $key => $value) { $tag_separated[$key] = $value."]\n"; if (substr_count($value, "Content-Type")) {$tag_separated[$key] = "";} } ////////////////////////////// // SECTION 4 :: PARSING XML // ////////////////////////////// // $titles array will hold the last 10 songs played // Note that $titles[0] will give you the currently playing song // -- the following are provided to let you know which stats are being grabbed by this script $titles = array(); $currentlisteners=0; $peaklisteners=0; $maxlisteners=0; $reportedlisteners=0; $averagetime=0; $servergenre=""; $serverurl=""; $servertitle=""; foreach ($tag_separated as $value) { if (substr_count($value, "[/TITLE]")) { $value = str_replace ("[/TITLE]","", $value); array_push ($titles, $value); } if (substr_count ($value, "[/CURRENTLISTENERS]")) { $value = str_replace ("[/CURRENTLISTENERS]","", $value); $currentlisteners=$value; } if (substr_count ($value, "[/PEAKLISTENERS]")) { $value = str_replace ("[/PEAKLISTENERS]","", $value); $peaklisteners=$value; } if (substr_count ($value, "[/MAXLISTENERS]")) { $value = str_replace("[/MAXLISTENERS]","", $value); $maxlisteners=$value; } if (substr_count ($value, "[/REPORTEDLISTENERS]")) { $value = str_replace("[/REPORTEDLISTENERS]","", $value); $reportedlisteners=$value; } if (substr_count ($value, "[/AVERAGETIME]")) { $value = str_replace("[/AVERAGETIME]","", $value); $averagetime=$value; $tmp=$averagetime / 60; $averagesec=$averagetime % 60; if ($averagesec < 10) {$averagesec = "0".$averagesec;} $averagemin = sprintf ("%d",$tmp); $averagehour = $averagemin / 60; $averagemin = $averagemin % 60; $averagehour = sprintf ("%d", $averagehour); } if (substr_count ($value, "[/SERVERGENRE]")) { $value = str_replace("[/SERVERGENRE]","", $value); $servergenre=$value; } if (substr_count ($value, "[/SERVERURL]")) { $value = str_replace("[/SERVERURL]","", $value); $serverurl=$value; } if (substr_count ($value, "[/SERVERTITLE]")) { $value = str_replace("[/SERVERTITLE]","", $value); $servertitle=$value; if (substr_count ($servertitle, "N/A")) {$servertitle = "Radio is currently offline!";} } if (substr_count ($value, "[/STREAMHITS]")) { $value = str_replace("[/STREAMHITS]","", $value); $streamhits=$value; } } // $nowplaying[0] = currently playing artist // $nowplaying[1] = currently playing title // Obviously, use of this requires that titles be named like so: // Artist - Title // If not, just use $titles[0] for the current song $temp = $titles[0]; $nowplaying = explode (" - ",$temp); ////////////////////////////////// // SECTION 5 :: OUTPUT THE PAGE // ////////////////////////////////// //Show if on or off -added by bodhisattva// $fp = fsockopen("$shout_server", $shout_port, &$errno, &$errstr, 30); if(!$fp) { $success=2; } if($success!=2){ //if connection fputs($fp,"GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); while(!feof($fp)) { $page .= fgets($fp, 1000); } fclose($fp); $page = ereg_replace(".*<body>", "", $page); //extract data $page = ereg_replace("</body>.*", ",", $page); //extract data $numbers = explode(",",$page); $currentlisteners=$numbers[0]; $connected=$numbers[1]; if($connected==1) $wordconnected="yes"; else $wordconnected="no"; } if($success!=2 && $connected==1){ print "<font color='red'><b>Yayindaki Dj:</b></font> <b> $servertitle </b><br> "; print "<font color='red'><b>Suanda Çalan Sarki:</b></font> <b> $nowplaying[0] - $nowplaying[1]</b></font><br> "; print "<font color='red'><b>Suanda Radyomuzda:</b></font><font color='blue'><b> $currentlisteners<b/></font> Dinleyici Mevcut... "; } else{ print "Time: ".date ("h:i:s A")." "; print "Stream is currently down. "; } } ?>DEMO: www.dorukokey.com/radyo2.php
Düzenleme yaparak birşeyler yapabilirsin...
Birde Refresh Yani Kendi Kendine Her 1 Dakikada Bir Yenileme Kodu Koyarsna İyi Olur...
Örnek:<html> <meta http-equiv="Refresh" content="60;url=http://www.dorukokey.com/radyo2.php" /> <html>
bı yardımcı olurmusun php bılgım yok ondandır