Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   Shoutcast Technical Support (http://forums.winamp.com/forumdisplay.php?f=86)
-   -   Performing local directory test (http://forums.winamp.com/showthread.php?t=148533)

kjetilbmoe 8th September 2003 11:33

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?

DJHotIce 8th September 2003 12:19

is $errn and $errs defined? Doesn't apear so

kjetilbmoe 8th September 2003 12:24

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.

FesterHead 8th September 2003 16:00

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");

?>



All times are GMT. The time now is 15:44.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.