Old 8th September 2003, 11:33   #1
kjetilbmoe
Junior Member
 
Join Date: Sep 2002
Location: Bergen, Norway
Posts: 7
Performing local directory test

Hi,

i'm trying to perform a local directory test, to see if the server is off, on--line, or broadcasting. See the code snippet below.

PHP Code:
<?php

$l 
fsockopen('10.0.0.4'8000$errn$errs1);

if (
$l == FALSE) echo $errn ' . ' $errs;
else {
  
fwrite ($l"icy-metadata:1\r\n");       $txt fgets ($l100);
  echo 
strlen($txt);
}

?>
but this is not working. Am I u sing the right headres. The problem is that I do not receive any text when sending the first header. Does anyone see my problem?
kjetilbmoe is offline   Reply With Quote
Old 8th September 2003, 12:19   #2
DJHotIce
Forum Loser
(Forum King)
 
DJHotIce's Avatar
 
Join Date: Jan 2003
Location: That place I can't remember the name.
Posts: 4,617
Send a message via AIM to DJHotIce Send a message via Yahoo to DJHotIce
is $errn and $errs defined? Doesn't apear so

-DJHotIce
Bounce Multimedia - Professional Web Design
DJHotIce is offline   Reply With Quote
Old 8th September 2003, 12:24   #3
kjetilbmoe
Junior Member
 
Join Date: Sep 2002
Location: Bergen, Norway
Posts: 7
they are simply the var's that the error msg's are written to. They should not be crucial to the outcome of the script.
kjetilbmoe is offline   Reply With Quote
Old 8th September 2003, 16:00   #4
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Here's something simple:
PHP Code:
<?php 

$check1 
fsockopen ("DNAS IP""DNAS PORTBASE"); 

if (
$check1) { 
  echo (
"Stream is up");
  
$close fclose($check1);

else
  echo (
"Stream is down");

?>

FesterHead 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