Jump to content

DAVEROGERS

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by DAVEROGERS

  1. oops sory bout the tags

     

    <html>

    <head>

    <title>Recordheadz.net</title>

    <?php

    require_once('fn.inc.php');

    $out=output_rss_tag($ret);

    ?>

    </head>

    <body bgcolor = "#ffffcc" text = "#000000">

    <h1>server status!<?php echo $ret[sONGTITLE]; ?></h1>

     

    </body>

    </html>

  2. I am trying to get this to work in an html page.

    <head>
    <?php
    require_once('fn.inc.php');
    $out=output_rss_tag($ret);
    ?>
    </head>
    <head>
    <title>       </title>
    <style type="text/css">
    <!--
    h1	{text-align:center;
    font-family:Arial, Helvetica, Sans-Serif;
    }
    
    p	{text-indent:20px;
    }
    -->
    
    </style>
    </head>
    <body bgcolor = "#ffffcc" text = "#000000">
    <h1>server status!<?php echo $ret[sONGTITLE]; ?></h1>
    
    </body>
    </html>

    I cant seem to figure out why its not diplaying the results

     

    Many thanks

  3. Just popin in to say hi. I have decided a few weeks ago I am going to learn this php properly and so far not too well seems really hard. But I suppose its a slow go process. Well look forward to picking your brains on here ALOT  :)

     

    cheers

    Dave

  4. Hi guys I have an old script here which I have tried to recode a bit to work now but still cant get it working. I am in no way a php guru only slightly educated on it here.

     

    <?php
    
    // simple.php - shoutcast information display utility
    
    
    // To use this script, save this page save simple.php then edit the information below as noted, uncomment what you need
    // To imbed the information on your php site use the include function on the page you wish to display the information
    
    
    // Edit the next three lines with your server information
    $host = "77.101.38.153";
    $port = "8000";
    $shoutcast_password = "liliarogers";  
    
    // Connect to server
    $fp = fsockopen( $host,$port,$errno,$errstr,10 );
    if (!$fp) {
        echo "Unable to connect to server";
      } else {
    
    // Get data from server
    fputs($fp,"GET /admin.cgi?mode=viewxml&SID=1&page=5&pass=$shoutcast_password
    HTTP/1.1\nUser-Agent:Mozilla\n\n");
    
    // exit if connection broken
    for($i=0; $i<1; $i++) {
    if(feof($fp)) break;
    $fp_data=fread($fp,31337);
    usleep(500000);
    }
    
    // Strip useless junk from source data
    $fp_data=ereg_replace("^.*<body>","",$fp_data);
    $fp_data=ereg_replace("</body>.*","",$fp_data);
    
    // Place values from source into variable names
    list($currentlisteners,$streamstatus,$peaklisteners,$maxlisteners,$reportedlisteners,$bitrate,$songtitle) = explode(",", $fp_data, 7);
    
    $trackpattern = "/^[0-9][0-9] /";
    $trackreplace = "";
    $song = preg_replace($trackpattern, $trackreplace, $song);
    
    if ($streamstatus == "1") {
    // To use any of the outputs below just uncomment (remove the double forward slashes) that line.
    // Below is an example of all data available in the 7.html file made by the Shoutcast server
    // **ON BY DEFAULT - COMMENT OUT (put to forwards slashes in front of it) TO HIDE
    
        echo "<html>\n<head>\n<title></title>\n</head>\n<body>\nCurrent Listeners: $currentlisteners<br>\nServer Status: $streamstatus<br>\nListener Peak: $peaklisteners<br>\nMaximum Listener: 
    
    $maxlisteners<br>\nReported Listeners: $reportedlisteners<br>\nBroadcast Bitrate: $bitrate<br>\nCurrent Song: $songtitle\n</body>\n</html>";
    // Below is a basic one line value of the current song, perfect for front pages of sites
    // echo "<html>\n<head>\n<title></title>\n</head>\n<body>\nCurrently Playing: <a href=\"http://$host:$port/listen.pls\">$songtitle</a>\r\n</body>\n</html>";
    
        } else {
        echo "The radio station is currently down";
    } }
    ?>

     

    many thanks

  5. Hello everyone

     

    I am looking for a coder to help out with my site. I just need a few scripts to pull xml data from the shoutcast 2.0 server. Not the 1.9 server as the data is different now.

    If anyone is interested please contact me via email  or this forums pm. I may have more work availible with the custom coding of the site as well.

     

    Many thanks

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.