Pradinis
Pagalba
Užsisakyk!
- Reklamą
- Hostingą
- El. pašto dėžutę
Užsisakyk!
Įrankiai
Pasidalink
- Visos temos
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | C#, Python, Java, JS, C++ klausimai |
Autorius: arzz2 | Peržiūrų: 2427 |
arzz2 Narys Patrankų mėsa Pranešimai: 5 Įstojęs: 2010 Vas. 16 20:02:39 | |
<?php error_reporting(0); $scdef = "Vyksta Profilaktikos Darbai"; // Default station name to display when server or stream is down $scip = "82.135.230.135"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port) $scport = "8000"; // port of shoutcast server $scpass = "pass"; // password to shoutcast server $maxusers = "500"; //Kiek vienu sykiu klausosi zmoniu //$laida = "FM-GIRLS"; //LAIDOS PAVADINIMAS //End configuration error_reporting(0); $scsuccs = NULL; $page = NULL; include('config_radio.php'); //you may edit this path to fit your server environment otherwise leave it alone $scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 80); if(!$scfp) { $scsuccs=1; echo''.$scdef.''; } if ($scsuccs != 1) { fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n"); while(!feof($scfp)) { $page .= fgets($scfp, 1000); } ###################################################################################################################### /////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //define xml elements $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "AIM", "ICQ"); $y=0; while (isset($loop[$y])) { $pageed = ereg_replace(".*<$loop[$y]>", "", $page); $scphp = strtolower($loop[$y]); $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed); if (($loop[$y] == "SERVERGENRE") || ($loop[$y] == "SERVERTITLE") || ($loop[$y] == "SONGTITLE") || ($loop[$y] == "SERVERTITLE") || ($loop[$y] == "CURRENTLISTENERS") || ($loop[$y] == "ICQ") ||($loop[$y] == "AIM")) $$scphp = urldecode($$scphp); // uncomment the next line to see all variables // echo'$'.$scphp.' = '.$$scphp.''; $y++; } //end intro xml elements ###################################################################################################################### ###################################################################################################################### /////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //get song info and history $pageed = ereg_replace(".*<SONGHISTORY>", "", $page); $pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed); $songatime = explode("<SONG>", $pageed); $r=1; while (isset($songatime[$r])) { $t=$r-1; $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]); $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]); $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]); $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]); $song[$t] = urldecode($song[$t]); $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page); $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed); $r++; } $daina = str_replace('_',' ',substr ($song[0],0,90)); $laida = str_replace('_',' ',substr ($icq[0],0,90)); //end song info fclose($scfp); } //display stats if($streamstatus == "1"){ switch ($aim) { case 'Serveris': $aimlogo = "Serveris"; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case 'Modukas;**': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; case '': $aimlogo = ""; break; default: $aimlogo = "dj"; } $_SESSION['djus'] = $aim; echo' <table cellpadding="0" cellspacing="0"> <tr> <td height="100" width="90" style="padding-left:10px;"> <a href="http://www.tipofm.lt/radio/'.$aimlogo.'.gif"><img border="0" src="http://www.tipofm.lt/radio/'.$aimlogo.'.gif" height="90" border="0" title="Spausk, kad padidinti"></a> </td> <td style="padding-left:10px;"><b>Eteryje:</b> <span style="font-size:10px;"><b>'.$aim.'</b></span><br /><br /> <b>Laida:</b> <span style="font-size:10px;"><b>'.$icq.'</b></span> </td> </tr> </table> <table cellpadding="0" cellspacing="0" align="center"> <tr> <td align="center" style="padding-bottom:5px; padding-top:5px;"><MARQUEE SCROLLDELAY="2" SCROLLAMOUNT="1"> '.$daina.'<br /><br /> </MARQUEE> </td> </tr> </table>'; } if($streamstatus == "0") { echo"Serveris laikinai neveikia"; } ?> |
Bencius Narys Buldozeris Pranešimai: 201 Įstojęs: 2009 Gru. 19 18:12:02 | |
Tai tau cia visas kodas, kas neveikia? Ar tu nesupranti kaip pritaikyti? 0 |
|
MantasV Narys Buldozeris Pranešimai: 232 Įstojęs: 2010 Gru. 16 20:12:39 | |
ase 'Modukas;**': $aimlogo = "logotipopavadinimas"; break; Nuotraukas turi kelti čia: http://www.tipofm.lt/radio/ Nuotraukos tipas: .gif Ir be to turi nusistatyti pats per ką transliuoji AIM stulpelyje. Tai šiuo atveju tau reikėtų AIM`e įrašyti: Modukas;**, nes tik tada atpažins tave kaip eteryje esantį RDJ. 0 |
|
arzz2 Narys Patrankų mėsa Pranešimai: 5 Įstojęs: 2010 Vas. 16 20:02:39 | |
nu nemoku pritaikyt nu padarykit ka 0 #1 Na scriptas tai tvarkingas, bet mes už tave neįkišim į hostingą scripto ir nepatvarkysim tavo transliavimo softo. — MantasV, 2011 Vas. 10 17:02:49 |
|
Bencius Narys Buldozeris Pranešimai: 201 Įstojęs: 2009 Gru. 19 18:12:02 | |
arzz2 parasyk man i skype: benasbauba padesiu. 0 |
|
arzz2 Narys Patrankų mėsa Pranešimai: 5 Įstojęs: 2010 Vas. 16 20:02:39 | |
IS KUR GAUT TA MODA KUR REIK YRASYT Y AIM? 0 |
Peršokti į forumą: |