Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kintamųjų skaidymas į dvi dalis

Parašė Al Capone· 2013 Kov. 19 18:03:30
#5

Nesigavo, gal galėtumėt padėti įterpti? :) Ačiū.


<?php
error_reporting(0);
$scdef = "Grojarascio nera";               // Kai serveris isjungtas rodo
$scip = "Serverio IP"; // shoutcast serverio IP be porto
$scport = "Serverio Port";                   // shoutcast serverio portas
$scpass = "Serverio Pass";                 // shoutcast serverio pasvordas
$maxusers = "50"; //Kiek vienu sykiu klausosi zmoniu
//End configuration
error_reporting(0);
$scsuccs = NULL;
$page = NULL;
$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 01);
 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);
 }
#############Pagamino Dj_Dede, <a href='http://www.upofm.wu.lt############' target='_blank'><span style='color:005C5B'>http://www.upofm.wu.lt############</span></a>
#####################konfiguracija 01#####################
 $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "AIM");
 $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] == "AIM"))
   $$scphp = urldecode($$scphp);
 
// echo'$'.$scphp.' = '.$$scphp.'<br>';
  $y++;
 }
#####################///konfiguracija 02#####################
 $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++;
 }
 $Grojo = str_replace('_',' ',substr ($song[1],0,200));
 $Grojo2 = str_replace('_',' ',substr ($song[2],0,200));
 $Grojo3 = str_replace('_',' ',substr ($song[3],0,200));
 $Grojo4 = str_replace('_',' ',substr ($song[4],0,200));
 $Grojo5 = str_replace('_',' ',substr ($song[5],0,200));
//end song info
 
fclose($scfp);
}
#####################//Muzikos rikevimas#####################
if($streamstatus == "1"){
$_SESSION['songtitle'] = $song;
echo'<div align="left">
 <table cellpadding="0" cellspacing="0" width="1">
  <!-- MSTableType="nolayout" -->
<font face="Tahoma" style="font-size: 8pt" color="#3E1710"><b>1.</b></font>
   <font face="Tahoma" style="font-size: 8pt" color="#000000">'.$Grojo.'</font></td>
<br>
<font face="Tahoma" style="font-size: 8pt" color="#3E1710"><b>2.</b></font>
   <font face="Tahoma" style="font-size: 8pt" color="#000000">'.$Grojo2.'</font></td>
<br>
<font face="Tahoma" style="font-size: 8pt" color="#3E1710"><b>3.</b></font>
   <font face="Tahoma" style="font-size: 8pt" color="#000000">'.$Grojo3.'</font></td>
<br>
<font face="Tahoma" style="font-size: 8pt" color="#3E1710"><b>4.</b></font>
   <font face="Tahoma" style="font-size: 8pt" color="#000000">'.$Grojo4.'</font></td>
<br>
<font face="Tahoma" style="font-size: 8pt" color="#3E1710"><b>5.</b></font>
   <font face="Tahoma" style="font-size: 8pt" color="#000000">'.$Grojo5.'</font></td>
 </table>';
}
?>