ilch Forum » Allgemein » HTML, PHP, SQL,... » Playerübersicht in iframe

Geschlossen
  1. #1
    User Pic
    Mictlan Mitglied
    Registriert seit
    09.03.2008
    Beiträge
    123
    Beitragswertungen
    0 Beitragspunkte
    Hallo liebe Community,
    nun brauch ich wieder eure Hilfe!
    Ich versuche seit 5 tagen eine Playerübersicht zu coden,
    leider hab ich nur beschränkt Kenntnisse und würde mich über eure Hilfe sehr freuen! Die Playerlinks.php möchte ich in das Ilch-Menü einbinden!

    Das ist die Übersichtsseite wo die Player angezeigt werden sollen,
    darunter soll wie in dem "Link Us Modul" ein Fenster sein, wo man sich
    den IFrame-Code heraus kopieren kann für seine persönliche Homepage!

    Playerlinks.php
    <center>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%" height="220" align="center">&nbsp;</td>
          <td width="50%" height="220" align="center"><iframe name="player2" width="140" height="200" scrolling="no" cellspacing="0" cellpadding="0" src="http://www.vampire-records.com/player/2/player2.php"></iframe> </td>
        </tr>
        <tr>
          <td align="center">&nbsp;</td>
          <td align="center">&nbsp;</td>
        </tr>
      </table>
    </center>


    player2.php
    <?php	
    include("http://www.vampire-records.com/player/streamdatas.php");	
    ?>
     
    <table align="center" width="140" height="200" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="middle">
        
        <table width="140" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="30" align="center" valign="top" background="http://www.vampire-records.com/player/2/bilder/player2_01.png">
        <table width="86%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="9" align="center"></td>
      </tr>
        <tr>
        <td height="20" align="center" valign="bottom"><marquee>Vampire Records || Lost in Music</marquee></td>
      </tr>
          <tr>
        <td height="1" align="center"></td>
      </tr>
    </table>
    </td>
      </tr>
    </table>
       <table width="140" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="28" height="85" background="http://www.vampire-records.com/player/2/bilder/player2_02.png"></td>
        <td width="85" height="85" background="http://www.vampire-records.com/player/2/bilder/player2_03.png">
      	<img width="85" height="85" src="http://www.vampire-records.com/include/images/dj_penal/<?php print $djb ?>.jpg"></td>
        <td width="27" height="85" background="http://www.vampire-records.com/player/2/bilder/player2_04.png"></td>
      </tr>
    </table>
       <table width="140" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="7" background="http://www.vampire-records.com/player/2/bilder/player2_05.png"></td>
        </tr>
    </table>
     <table width="140" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25" height="19" background="http://www.vampire-records.com/player/2/bilder/player2_06.png"></td>
        <td width="91" height="19" align="center" background="http://www.vampire-records.com/player/2/bilder/player2_07.png"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center" valign="middle"><p style="line-height:100%; margin-top:0; margin-bottom:0;"><marquee direction="left" scrollamount ="4">Vampire-Records <? print $dj ?> |--&gt; <? print $song ?></marquee></p></td>
          </tr>
        </table></td>
        <td width="24" height="19" background="http://www.vampire-records.com/player/2/bilder/player2_08.png"></td>
      </tr>
    </table>
    <table width="140" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="23" height="31" background="http://www.vampire-records.com/player/2/bilder/player2_10.png"></td>
        <td align="center" valign="middle"><a href="http://www.vampire-records.com/stream.asx"><img src="http://www.vampire-records.com/player/2/bilder/player2_11.png" alt="Windows Media Player" name="WMP" width="29" height="31" border="0" id="WMP" /></a></td>
        <td align="center" valign="middle"><a href="http://188.92.201.88:8300/listen.pls"><img src="http://www.vampire-records.com/player/2/bilder/player2_12.png" alt="Winamp" name="WA" width="39" height="31" border="0" id="WA" /></a></td>
        <td align="center" valign="middle"><a href="http://www.vampire-records.com/stream.ram"><img src="http://www.vampire-records.com/player/2/bilder/player2_13.png" alt="Realplayer" name="RP" width="35" height="31" border="0" id="RP" /></a></td>
        <td width="14" height="31" background="http://www.vampire-records.com/player/2/bilder/player2_14.png"></td>
      </tr>
    </table>
    <table width="140" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="21" background="http://www.vampire-records.com/player/2/bilder/player2_15.png"></td>
      </tr>
    </table>
    
        </td>
      </tr>
    </table>


    streamdatas.php
    <?php 
    #   Copyright by Stefan Kurze 
    #   Support www.sk-computer.org
    
    
    defined ('main') or die ( 'no direct access' );
    
    $scip =  'ip-adresse';
    $scport = 'port';                  
    $scpass = 'passwort';
    
    $scfp = @fsockopen($scip, $scport, &$errno, &$errstr, 1);
     if(!$scfp) {
      print 'Stream offline';
     }else{
     	
    //Shoutcast auslesen
     	
    
     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", "MAXLISTENERS", "BITRATE", "AIM");
     $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)
       $$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);
    }
    
    $dj = $servertitle;
    $djb = str_replace(" ", "_", $servertitle); 
    $song = $song[0];
    ?>



    Zuletzt modifiziert von Mictlan am 27.09.2009 - 13:25:18
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu HTML, PHP, SQL,...

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten