Old 4th July 2005, 21:46   #41
monkanddave
Junior Member
 
Join Date: Jun 2005
Posts: 11
Quote:
Originally posted by internetbrother
Thanks, Very good and it works fine, but I was thinking is it possible to make the image a link. when the radio is on the image can be a link and people click on it and when the radio is off the image is not a link

I think this way will be very cool
EXACTLY! This is what I'm going for. Anyone know how to modify the code to get this to work? It's gotta be possible.

Also, another question now. I'm using the above code, but it always shows that I'm offline. I never get online, even when my DNAS is up and running and I'm broadcasting music. I've tried typing the listen URL into the browser on my wife's PC and it works, so I know I'm going out. What could be the problem?
monkanddave is offline   Reply With Quote
Old 8th July 2005, 17:58   #42
jjm261
Junior Member
 
Join Date: Jun 2005
Posts: 6
does anyone know ay FREE php supporting sites
jjm261 is offline   Reply With Quote
Old 8th July 2005, 18:38   #43
NJK
The Frisian
 
NJK's Avatar
 
Join Date: Sep 2003
Location: a real Frisian hometown
Posts: 14,990
Quote:
Originally posted by jjm261
does anyone know ay FREE php supporting sites
Does the word Google ring a bell???

Each Thursday a new show on Celtica Radio with Darkwave music.
**************************************************************************

WINAMPSHOUTCAST
NJK is offline   Reply With Quote
Old 26th July 2005, 18:38   #44
monkanddave
Junior Member
 
Join Date: Jun 2005
Posts: 11
Did anyone ever find anything out about this? I'd still like to know how to make the On Air image clickable.
monkanddave is offline   Reply With Quote
Old 27th July 2005, 00:43   #45
baseballbrad3
Junior Member
 
Join Date: Jun 2005
Location: My House
Posts: 45
have you gotton the script to work properly? if you have, then use the following code
code:
<A HREF="link.html"><IMG SRC="image.php"></A>
baseballbrad3 is offline   Reply With Quote
Old 7th October 2005, 11:02   #46
DJ-CAZ
Junior Member
 
Join Date: Sep 2005
Posts: 17
can any one tell me a php status file using this

ip : 80.4.32.238
port : 4021
DJ-CAZ is offline   Reply With Quote
Old 7th October 2005, 11:16   #47
Evil Lu
Forum Maitresse
 
Evil Lu's Avatar
 
Join Date: Mar 2005
Location: I'm hiding under your bed
Posts: 2,974
<?php

$scip = "80.4.32.238";
$scport = "4021";
$scpass = "your DNAS password";


?>
Evil Lu is offline   Reply With Quote
Old 4th March 2006, 17:40   #48
JohnnyGnote
Junior Member
 
JohnnyGnote's Avatar
 
Join Date: Mar 2006
Location: Durango CO
Posts: 24
Hello All, I have recently created my station, Colorado Free Radio Durango, I have been perusing this thread fro some time trying to fiqure out the best approach to stats on my newly created webpage for the station. I'm not new to HTML and i have programed in the past with other scripts, I have used linux for several years. I am new to PHP. IN reading the thread I have tried several of the scripts and several things are happening. I am using an PHP enabled webhost. This is what Ive done so far, I added this script:

<?php
// This is the function....
function sc_status(68.38.25.118, 8000, $file) {
$cont = "";
$ip = gethostbyname(coloradofreeradio.com);
$fp = fsockopen(68.38.25.118, 8000);
if (!$fp)
{
return "Unknown";
}
else
{
$com = "GET $file HTTP/1.1\r\nAccept: */*\r\nAccept-Language: de-ch\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\nHost: $server:$port\r\nConnection: Keep-Alive\r\n\r\n";
fputs($fp, $com);
while (!feof($fp))
{
$cont .= fread($fp, 500);
}
fclose($fp);
$cont = substr($cont, strpos($cont, "\r\n\r\n") + 4);
//return $cont;
}
$parts = explode(',', $cont);
$status = $parts['1'];
if ($status == '0') {
return "<img src='http://www.coloradofreeradio.com/images/off.png' alt='Server is DOWN'>";
} else {
return "<img src='http://www.coloradofreeradio.com/images/air.gif' alt='Server is UP'>";
}

}

// This is what you would call...
echo sc_status('68.38.25.118', '8000', '/7.html');
?>

I'm not sure if I have my syntax correct. I get the on the air icon on no matter what and a part of the tag on either side of the graphic. Like this

else { return "(Graphic is Here)"; } } // This is what you would call... echo sc_status('68.38.25.118', '8000', '/7.html'); ?>

Fortunately I use a black background so it's not visible. As I said I'm new to PHP. I'm adding the script in my index.htm file. Is this correct? I have loaded RadioToolbox on my server so I'm looking in to adding the PHP files to my host site, and reading the documentation at the RTB website very carefully. I noticed there is a file in my Cpanel that is called wysywigPro_edit_index_htm.php, is this the file I want to edit? Any help would be appreciated

JohnnyGnote is offline   Reply With Quote
Old 7th March 2006, 18:08   #49
darik
Junior Member
 
Join Date: Mar 2006
Location: AL
Posts: 5
Hey guys. I been readin this form and I I really dont know to use this script.
<?php
// This is the function....
function sc_status($server, $port, $file) {
$cont = "";
$ip = gethostbyname($server);
// 3 is the timeout in seconds
$fp = fsockopen($ip, $port, $errno, $errstr, 3);
if (!$fp)
{
return "<img src='http://img.photobucket.com/albums/v209/djjonni/off.png' alt='Server is DOWN'>";
}
else
{
$com = "GET $file HTTP/1.1\r\nAccept: */*\r\nAccept-Language: de-ch\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\nHost: $server:$port\r\nConnection: Keep-Alive\r\n\r\n";
fputs($fp, $com);
while (!feof($fp))
{
$cont .= fread($fp, 500);
}
fclose($fp);
$cont = substr($cont, strpos($cont, "\r\n\r\n") + 4);
//return $cont;
}
$parts = explode(',', $cont);
$status = $parts['1'];
if ($status == '0') {
return "<img src='http://img.photobucket.com/albums/v209/djjonni/off.png' alt='Server is DOWN'>";
} else {
return "<img src='http://img.photobucket.com/albums/v209/djjonni/air.gif' alt='Server is UP'>";
}

}

// This is what you would call...
echo sc_status('213.48.102.230', '9234', '/7.html');
?>

What do I do to make this script work? Do I need to do this in linux or just delete the html code and put the script in there and name it .php or some other exstention? Let me know guys! You seem very inteligent in this field. Thanks Darik
darik is offline   Reply With Quote
Old 29th July 2009, 10:22   #50
AndreaP
Junior Member
 
Join Date: Aug 2008
Posts: 5
html?

is it possible to have a script doing the same function IN HTML?
Because I would like to use it in BLOGGER, where php doesn't work.
Can anyone help me?
Thanks
AndreaP is offline   Reply With Quote
Old 29th July 2009, 10:54   #51
Nick@ss
Moderator
 
Nick@ss's Avatar
 
Join Date: Nov 2004
Location: Streamsolutions Headquarters
Posts: 11,953
Html scripts are rare and generally do not work.

I havent seen anything around these parts.
Nick@ss is offline   Reply With Quote
Old 29th July 2009, 17:26   #52
AndreaP
Junior Member
 
Join Date: Aug 2008
Posts: 5
ok..
waiting for blogger to support php (?), I keep searching. If I ever find something in html, I'll report it to you.
(And you to me, in case... Mh?)

Thank you
bye
AndreaP 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