הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 08-03-06, 17:20   # 1
lior_sh69
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 90

lior_sh69 לא מחובר  

צריך עזרה בקוד של "מי בשידור"...

יש לי קוד ואני לא יודע מה הבעיה....

PHP קוד:

include ("config.php");

if (
$scsuccs!=1) {
if(
$streamstatus == "1"){
if (isset(
$dj)) {
echo 
"<b>Listeners:</b> $currentlisteners&nbsp;&nbsp;&nbsp;<a href=\"http://$scip:$scport/listen.pls\">Click to listen!</a><br>
<b>Current Title</b>: $servertitle<br>
<b>Current Song:</b> $song[0]<br>
<b>Current DJ ID</b>: $dj<br>
<b>Current DJ</b>: $name<br>
"
;

if ((empty(
$aimdb)) && (isset($aim) && $aim) && ($aim != "N/A")) {
$aimdb $aim;
}

if ((empty(
$icqdb)) && (isset($icq) && $icq)) {
$icqdb $icq;
}

if (isset(
$aimdb) && $aimdb) {
echo 
"<b>AIM</b>: $aimdb<br>";
}

if (isset(
$msn) && $msn) {
echo 
"<b>MSN</b>: $msn<br>";
}

if (isset(
$yim) && $yim) {
echo 
"<b>YIM</b>: $yim<br>";
}

if (isset(
$icqdb) && $icqdb) {
echo 
"<b>ICQ</b>: $icqdb<br>";
}

if (isset(
$address) && $address) {
echo 
"<b>Song request page</b>: <a href=\"$address\">Link</a>";
}

if (
$showsetby == 1) {
echo 
"<br><br><b>This DJ was found by checking:</b> $setby";
}

} else {
echo 
"<b>A DJ is not currently signed on to the system. Please check again later.</b>";
}
} else {
echo 
"<b>A DJ is not currently connected to the radio. Please check again later.</b>";
}
} else {
echo 
"<b>The radio is currently down. Please check again later.</b>";



config


PHP קוד:

<?php


# Database
$dbhost "localhost";
$dbname "db";
$dbuser "radio";
$dbpass "1123";

# Shoutcast
$scdef "radio-ex";
$scip "127.0.0.1";
$scport "8000";
$scpass "1123";

# Admin Panel
$adminname "111";
$adminpass "111";


$version "1.8";

$filename "admin/install/index.php";

// Shoutcast Server Stats
$scfp = @fsockopen("$scip"$scport, &$errno, &$errstr10);
 if(!
$scfp) {
  
$scsuccs=1;
# echo'<strong>'.$scdef.' is Offline</strong><br>';
 
}
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($scfp1000);
 }
//define  xml elements
 
$loop = array("STREAMSTATUS""BITRATE""SERVERTITLE""CURRENTLISTENERS""AIM""ICQ");
 
$y=0;
 while(
$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 || $loop[$y]==ICQ)
   $
$scphp urldecode($$scphp);

// uncomment the next line to see all variables
#echo'$'.$scphp.' = '.$$scphp.'<br>';
  
$y++;
 }
//end intro xml elements

//get song info and history
 
$pageed ereg_replace(".*<SONGHISTORY>"""$page);
 
$pageed ereg_replace("<SONGHISTORY>.*"""$pageed);
 
$songatime explode("<SONG>"$pageed);
 
$r=1;
 while(
$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++;
 }
//end song info

fclose($scfp);
}

if (
file_exists($filename))  {
$nodb "1";
}

if (isset(
$nodb) == FALSE) {
include (
"dbconnect.php");
}

?>

הקוד מ- hotscripts
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 09:33.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ