Old 17th February 2004, 14:55   #1
Ga5tn
Junior Member
 
Ga5tn's Avatar
 
Join Date: Feb 2004
Posts: 22
Xml, html, what the?

Just by looking at my website (created using a wizard) you can tell im not very technical (or going for the simple look )
Newho basically im wondering is there a wizard or something which doesnt involve be messing about with html xml or php because quite simply i dont understand it. I just want something that shows the current track playing on my site, thats it.
Ne1 can help let me know thanks.

My website
Ga5tn is offline   Reply With Quote
Old 17th February 2004, 14:57   #2
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Check out the Sticky post titled...
SHOUTcast: Important Info & Answers to FAQs. READ ME!

Scroll down a bit and look for the section titled...
General SHOUTcast Information -> SHOUTcast ToolBox (All sorts of nifty add-ons for SHOUTcast)

1. The PHP based XML parser is a complete solution and comes ready for you to customize.

2. The Javascript parser (actually ASP) is another complete solution and comes ready for you to customize.
Note: Apparently this link isn't working anymore.
Try this thread for other ASP options.

Also, for an html implementation, check out:
KXRM's RadioToolbox
Oddsock's Do Something DSP plugin

********************

Don't want to mess with any of that?
Then link to the DNASs now playing page.

FesterHead is offline   Reply With Quote
Old 17th February 2004, 23:19   #3
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Maybe you could change the station name "fubar radio" ... I love the movie to death.. i think fester does too. I don't mean to be a dick but unless you are playing their soundtrack over and over I suggest you change the title. Thanx.


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 18th February 2004, 00:10   #4
GeJohnO
Senior Member
 
Join Date: Jan 2004
Posts: 186
This is more of a Sig, but you could easily edit it to fit your needs. I made the parts you need to change big...


Quote:
<?php
// This image you can call immediately from an html file in the image tag
// (i.e. <image src="black.php">) easy huh?

Header("Content-type: image/png");

// Fill in your own server information here:
$host = "YOUR IP/HOST";
$port = "YOUR PORT";
$listenlink = 'http://LISTENLINK'; //make link to stream

$fp = fsockopen("$host", $port, &$errno, &$errstr, 30); //open connection
if(!$fp) {
$success=2; //se-t if no connection
}
if($success!=2){ //if connection
fputs($fp,"GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); //get 7.html
while(!feof($fp)) {
$page .= fgets($fp, 1000);
}
fclose($fp); //close connection
$page = ereg_replace(".*<body>", "", $page); //extract data
$page = ereg_replace("</body>.*", ",", $page); //extract data
$numbers = explode(",",$page); //extract data
$currentlisteners=$numbers[0]; //set variable
$connected=$numbers[1]; //set variable

if($connected==1) //if DSP is connected
$wordconnected="yes"; //set variable
else //if no DSP connection
$wordconnected="no"; //set variable
$peaklisteners=$numbers[2]; //set variable
$maxlisteners=$numbers[3]; //set variable
$reportedlisteners=$numbers[4]; //set variable
}

// Image size can be changed here: (x, y)
$im = ImageCreate(200,60);

// Background color in R(ed)G(reen)B(lue) below
$background_color = ImageColorAllocate($im,0,0,0);

// text colors also in RGB
$text_color1 = ImageColorAllocate($im,0,204,255);
$text_color2 = ImageColorAllocate($im,0,204,51);

if($success!=2 && $connected==1){

// song information is splitted in artist - title:
// This requires consistent artist & title format (no ' - ' in title/artist)
// else you can use $numbers[6] as current song info below
$song=explode(" - ",$numbers[6]);

// strings can of course be replaced with your own bla
$string1= "Now playing on [YOURSTATION]:"; $string2= $song[0];
$string3= $song[1];
$string4= "[$currentlisteners/$maxlisteners users]";
}
else {
$string1= "[YOUR STATION] is currently";
$string2= ">OFFLINE<";
$string3= "Please check back later.";
$string4= ":::";
}

// positioning below
$px = (imagesx($im)-5*strlen($string1))/2;
ImageString($im,1,$px,5,$string1,$text_color1);
// (image,font (from 1 to 5),starting x position, y position,line of text,color)
$px = (imagesx($im)-5*strlen($string2))/2;
ImageString($im,1,$px,20,$string2,$text_color2);
$px = (imagesx($im)-5*strlen($string3))/2;
ImageString($im,1,$px,30,$string3,$text_color2);
$px = (imagesx($im)-5*strlen($string4))/2;
ImageString($im,1,$px,45,$string4,$text_color1);
ImagePng($im);
// In response to KXRM's reaction:
// if you want to cache the picture, you should place this script in
// your internetpage, remove line 5 (Header-call)
// and use ImagePng($im, "filename.png");
// NB: filename.png must have the right permission settings
// (CHMOD 777 does it)
//
// Then you can place filename.png in the same html-file.
ImageDestroy($im);
?>
Please note that I did NOT make this script (made by a fellow shoutcast user...). Anyways, enjoy.
GeJohnO is offline   Reply With Quote
Old 18th February 2004, 00:18   #5
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
3 times the script, 3 times the fun! BTW the script was created by DJ Rampage.

[Two of 'em whacked -> FesterHead]


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 18th February 2004, 13:54   #6
Ga5tn
Junior Member
 
Ga5tn's Avatar
 
Join Date: Feb 2004
Posts: 22
Gee thanx guys, so if i stuck this code in as my signature it should come up with someting like youve got? Also theres a movie? lol, i called it that cos my Newspaper at skewl is called Fubar Monthly™
Ga5tn is offline   Reply With Quote
Old 18th February 2004, 14:25   #7
Ga5tn
Junior Member
 
Ga5tn's Avatar
 
Join Date: Feb 2004
Posts: 22
Also what do i do with that code just stick it in on my website somewhere (with changes) or do i have to save it or do something technical etc. with it.
Ga5tn is offline   Reply With Quote
Old 18th February 2004, 15:01   #8
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Please rent mule and see this thread.

FesterHead is offline   Reply With Quote
Old 18th February 2004, 15:25   #9
Ga5tn
Junior Member
 
Ga5tn's Avatar
 
Join Date: Feb 2004
Posts: 22
Just had a look, apparently freeservers dont allow php on their "free" websites, a well, any other way it could be done? using just simple html
Ga5tn is offline   Reply With Quote
Old 18th February 2004, 19:43   #10
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
www.freepgs.com offers free php hosting. You just have to activate php my askin the admin in their forum.


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
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 On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump