Ultriukas
Narys
Buldozeris
Pranešimai: 296
Įstojęs: 2008 Vas. 5 20:02:40
|
Sveikučiai kaip padaryti šitą koduką,kad nuotrauka būtu kairėja ir eteryje,klauso groja irgi kaireja nu pavyzdys www.erafm.lt
Panelės kodas
<?php
error_reporting(0);
$scdef = "<center>Vyksta Profilaktikos Darbai"; // Default station name to display when server or stream is down
$scip = "ip"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "port"; // port of shoutcast server
$scpass = "pass"; // password to shoutcast server
//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");
$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] == "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));
//end song info
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
switch ($aim) {
case 'Serveris': $aimlogo = "Serveris.jpg"; break;
case 'Rokas': $aimlogo = "Rokas.jpg"; $skype = "skype:nightmare9999999999?chat"; break;
case 'Vilius': $aimlogo = "Vilius.jpg"; $skype = "skype:kibiriukas3?chat"; break;
case 'Tadas': $aimlogo = "Tadas.jpg"; $skype = "skype:klanai.sytes.net?chat"; break;
case 'Lorenas': $aimlogo = "Lorenas.jpg"; $skype = "skype:creme666?chat"; break;
case 'Indre': $aimlogo = "Indrute.jpg"; $skype = "skype:indruska56?chat"; break;
case 'Anciukas': $aimlogo = "Anciukas.jpg"; $skype = "skype:anciukaskwa?chat"; break;
case 'Gedas': $aimlogo = "Gedas.gif"; $skype = "skype:Gedasmp3s?chat"; break;
case 'Ievute': $aimlogo = "Ievute.jpg"; $skype = "skype:ievu4ikas?chat"; break;
case 'Kristy*': $aimlogo = "Kristy.jpg"; $skype = "skype:kristy_lialiax?chat"; break;
case 'VyCka': $aimlogo = "VyCka.jpg"; $skype = "skype:vyciune19?chat"; break;
case 'Fuxas': $aimlogo = "Fuxas.jpg"; $skype = "skype:algelis911?chat"; break;
case 'Sexiukes*': $aimlogo = "Sexiukes.jpg"; $skype = "skype:nezinau?chat"; break;
case 'Paulius': $aimlogo = "Paulius.jpg"; $skype = "skype:pulezzz1?chat"; break;
case 'Ultriukas': $aimlogo = "Ultriukas.jpg"; $skype = "skype:bcrytas2?chat"; break;
default: $aimlogo = "Serveris.png"; $skype = "http://82.135.230.57:8020/listen.pls";
}
$_SESSION['djus'] = $aim;
echo'<div align="left">
<table cellpadding="0" cellspacing="0" width="1">
<!-- MSTa*keiksmai*ype="nolayout" -->
<tr>
<td height="80" bgcolor="">
<align="left">
<a href="'.$skype.'"><img border="0" src="http://easyfm.uzeik.in/DJ/'.$aimlogo.'" width="70" heigth="100"></a></td>
</tr>
<td height="17" valign="bottom" bgcolor="">
<div align="right">
<table cellpadding="0" cellspacing="0" width="111">
<tr>
<td height="10">
<align="right">
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Eteryje :<small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$aim.'<small></font>
</tr>
<tr>
<td height="10">
<align="right">
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Klausytoju :</small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$currentlisteners.'</small></font>
</tr>
<tr>
<td height="10">
<align="right">
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Dabar Grojame :</small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$daina.'</small></MARQUEE></font>
</tr>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>';
}
if($streamstatus == "0")
{
echo'<font size="2" face="tahoma" color="#6C6D7B">Serveris laikinai neveikia</font>';
}
echo"
";
echo "
</td></td></tr>
</table></center>";
echo "<center><table width='0' cellpadding='0' cellspacing='0' border='0' width='1000' align='left' background='#000000'>";
echo "<tr bg='none'>";
?>
Visi žmonės negalvoja ką daro |
Tomcis
Narys
Generolas
Pranešimai: 1143
Įstojęs: 2008 Spa. 9 19:10:04
|
<?php
error_reporting(0);
$scdef = "<center>Vyksta Profilaktikos Darbai"; // Default station name to display when server or stream is down
$scip = "ip"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "port"; // port of shoutcast server
$scpass = "pass"; // password to shoutcast server
//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");
$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] == "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));
//end song info
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
switch ($aim) {
case 'Serveris': $aimlogo = "Serveris.jpg"; break;
case 'Rokas': $aimlogo = "Rokas.jpg"; $skype = "skype:nightmare9999999999?chat"; break;
case 'Vilius': $aimlogo = "Vilius.jpg"; $skype = "skype:kibiriukas3?chat"; break;
case 'Tadas': $aimlogo = "Tadas.jpg"; $skype = "skype:klanai.sytes.net?chat"; break;
case 'Lorenas': $aimlogo = "Lorenas.jpg"; $skype = "skype:creme666?chat"; break;
case 'Indre': $aimlogo = "Indrute.jpg"; $skype = "skype:indruska56?chat"; break;
case 'Anciukas': $aimlogo = "Anciukas.jpg"; $skype = "skype:anciukaskwa?chat"; break;
case 'Gedas': $aimlogo = "Gedas.gif"; $skype = "skype:Gedasmp3s?chat"; break;
case 'Ievute': $aimlogo = "Ievute.jpg"; $skype = "skype:ievu4ikas?chat"; break;
case 'Kristy*': $aimlogo = "Kristy.jpg"; $skype = "skype:kristy_lialiax?chat"; break;
case 'VyCka': $aimlogo = "VyCka.jpg"; $skype = "skype:vyciune19?chat"; break;
case 'Fuxas': $aimlogo = "Fuxas.jpg"; $skype = "skype:algelis911?chat"; break;
case 'Sexiukes*': $aimlogo = "Sexiukes.jpg"; $skype = "skype:nezinau?chat"; break;
case 'Paulius': $aimlogo = "Paulius.jpg"; $skype = "skype:pulezzz1?chat"; break;
case 'Ultriukas': $aimlogo = "Ultriukas.jpg"; $skype = "skype:bcrytas2?chat"; break;
default: $aimlogo = "Serveris.png"; $skype = "http://82.135.230.57:8020/listen.pls";
}
$_SESSION['djus'] = $aim;
echo'<div align="left">
<table cellpadding="0" cellspacing="0">
<tr>
<td height="80" bgcolor="">
<a href="'.$skype.'"><img border="0" src="http://easyfm.uzeik.in/DJ/'.$aimlogo.'" width="70" heigth="100"></a></td>
<td>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Eteryje :<small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$aim.'<small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Klausytoju :</small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$currentlisteners.'</small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Dabar Grojame :</small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$daina.'</small></MARQUEE></font>
</td>
</tr>
</table>
</div>';
}
if($streamstatus == "0")
{
echo'<font size="2" face="tahoma" color="#6C6D7B">Serveris laikinai neveikia</font>';
}
echo"
";
echo "
</td></td></tr>
</table></center>";
echo "<center><table width='0' cellpadding='0' cellspacing='0' border='0' width='1000' align='left' background='#000000'>";
echo "<tr bg='none'>";
?>
Niznaju ili srabotajet. (Nežinau ar veiks).
|
Ultriukas
Narys
Buldozeris
Pranešimai: 296
Įstojęs: 2008 Vas. 5 20:02:40
|
Groja : fsdfsdf eteryje: fdfdsf klauso : dfsdfsd viska eilute
Visi žmonės negalvoja ką daro |
Tomcis
Narys
Generolas
Pranešimai: 1143
Įstojęs: 2008 Spa. 9 19:10:04
|
<?php
error_reporting(0);
$scdef = "<center>Vyksta Profilaktikos Darbai"; // Default station name to display when server or stream is down
$scip = "ip"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "port"; // port of shoutcast server
$scpass = "pass"; // password to shoutcast server
//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");
$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] == "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));
//end song info
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
switch ($aim) {
case 'Serveris': $aimlogo = "Serveris.jpg"; break;
case 'Rokas': $aimlogo = "Rokas.jpg"; $skype = "skype:nightmare9999999999?chat"; break;
case 'Vilius': $aimlogo = "Vilius.jpg"; $skype = "skype:kibiriukas3?chat"; break;
case 'Tadas': $aimlogo = "Tadas.jpg"; $skype = "skype:klanai.sytes.net?chat"; break;
case 'Lorenas': $aimlogo = "Lorenas.jpg"; $skype = "skype:creme666?chat"; break;
case 'Indre': $aimlogo = "Indrute.jpg"; $skype = "skype:indruska56?chat"; break;
case 'Anciukas': $aimlogo = "Anciukas.jpg"; $skype = "skype:anciukaskwa?chat"; break;
case 'Gedas': $aimlogo = "Gedas.gif"; $skype = "skype:Gedasmp3s?chat"; break;
case 'Ievute': $aimlogo = "Ievute.jpg"; $skype = "skype:ievu4ikas?chat"; break;
case 'Kristy*': $aimlogo = "Kristy.jpg"; $skype = "skype:kristy_lialiax?chat"; break;
case 'VyCka': $aimlogo = "VyCka.jpg"; $skype = "skype:vyciune19?chat"; break;
case 'Fuxas': $aimlogo = "Fuxas.jpg"; $skype = "skype:algelis911?chat"; break;
case 'Sexiukes*': $aimlogo = "Sexiukes.jpg"; $skype = "skype:nezinau?chat"; break;
case 'Paulius': $aimlogo = "Paulius.jpg"; $skype = "skype:pulezzz1?chat"; break;
case 'Ultriukas': $aimlogo = "Ultriukas.jpg"; $skype = "skype:bcrytas2?chat"; break;
default: $aimlogo = "Serveris.png"; $skype = "http://82.135.230.57:8020/listen.pls";
}
$_SESSION['djus'] = $aim;
echo'<div align="left">
<table cellpadding="0" cellspacing="0">
<tr>
<td height="80" bgcolor="">
<a href="'.$skype.'"><img border="0" src="http://easyfm.uzeik.in/DJ/'.$aimlogo.'" width="70" heigth="100"></a></td>
<td>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Eteryje :<small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$aim.'<small></font><br />
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Klausytoju :</small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$currentlisteners.'</small></font><br />
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>Dabar Grojame :</small></font>
<font face="Tahoma" style="font-size: 10pt" color="#0a86cf"><small>'.$daina.'</small></MARQUEE></font>
</td>
</tr>
</table>
</div>';
}
if($streamstatus == "0")
{
echo'<font size="2" face="tahoma" color="#6C6D7B">Serveris laikinai neveikia</font>';
}
echo"
";
echo "
</td></td></tr>
</table></center>";
echo "<center><table width='0' cellpadding='0' cellspacing='0' border='0' width='1000' align='left' background='#000000'>";
echo "<tr bg='none'>";
?>
|