Connection Putus ???

Status
Not open for further replies.

Stryk0ur

New Member
Messages
42
Reaction score
0
Points
0
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$radioname = $params->get( 'radioname', 'FungKur.FM' );
$host = $params->get( 'host', 'fungkurfm.mine.nu' );
$port = $params->get( 'port', '8000' );
$chooseplayer = $params->get( 'chooseplayer', 'Choose Player' );
$listener = $params->get( 'listener', 'Listener' );
$from = $params->get( 'from', 'from' );
$peakmenu = $params->get( 'peakmenu', 'Peak' );
$serverstatus = $params->get( 'serverstatus', 'Server Status' );
$currentsong = $params->get( 'currentsong', 'Current Song' );

$fp=@fsockopen($host,$port,&$errno,&$errstr,10);
if (!$fp) {
echo "Connection Putus";
} else {

fputs($fp,"GET /7 HTTP/1.1\nUser-Agent:Mozilla\n\n");

for($i=0; $i<1; $i++) {
if(feof($fp)) break;
$fp_data=fread($fp,31337);
usleep(500000);
}
what does mean this prob Connection Putus ??
I wanna know too how I use mime type file ?? and thanks
 
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Try removing the error suppressor before the calling of the fsockopen function. It might help see what error is occuring.

This line:
Code:
$fp=@fsockopen($host,$port,&$errno,&$errstr,10);

Change to:
Code:
$fp = fsockopen($host,$port,&$errno,&$errstr,10);
 
Last edited:

Stryk0ur

New Member
Messages
42
Reaction score
0
Points
0
I have change this line as u said
$fp = fsockopen($host,$port,&$errno,&$errstr,10);
if (!$fp) {
echo "Connection Putus";
} else {
but I found now another problem " Warning: fsockopen(): unable to connect to 84.95.247.20:6925 in /backup/home/stryk0ur/public_html/modules/mod_shoutcastextended.php on line 24
Connection Putus
"
???
maybe on x10hosting.com cannot execute fsockopen !???? or ????
 
Last edited:

The_Magistrate

New Member
Messages
1,118
Reaction score
0
Points
0
No, the fsockopen command is being executed. There isn't a problem with x10. The fsockopen command is doing exactly what it is supposed to; if it can't connect, it throws the error message. Here are a few troubleshooting questions...

What server are you trying to connect to?
Do you have the right host IP address and port?
Is there a firewall/router blocking the host?
Do you have permissions to open that file?
 

Stryk0ur

New Member
Messages
42
Reaction score
0
Points
0
this is the origial script

<div>
<center><br>
<?php
/**
* Shoutcast Molok - A Joomla 1.0.8 shoutcast module
* @version 1.0
* @package mod_shoutcastextended.zip
* @copyright (C) 2005 by Molok - All rights reserved!
*/

# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$radioname = $params->get( 'radioname', 'FungKur.FM' );
$host = $params->get( 'host', 'fungkurfm.mine.nu' );
$port = $params->get( 'port', '8000' );
$chooseplayer = $params->get( 'chooseplayer', 'Choose Player' );
$listener = $params->get( 'listener', 'Listener' );
$from = $params->get( 'from', 'from' );
$peakmenu = $params->get( 'peakmenu', 'Peak' );
$serverstatus = $params->get( 'serverstatus', 'Server Status' );
$currentsong = $params->get( 'currentsong', 'Current Song' );

$fp = fsockopen($host,$port,&$errno,&$errstr,10);
if (!$fp) {
echo "Connection Putus";
} else {

fputs($fp,"GET /7 HTTP/1.1\nUser-Agent:Mozilla\n\n");

for($i=0; $i<1; $i++) {
if(feof($fp)) break;
$fp_data=fread($fp,31337);
usleep(500000);
}

$fp_data=ereg_replace("^.*<body>","",$fp_data);
$fp_data=ereg_replace("</body>.*","",$fp_data);

list($current,$status,$peak,$max,$reported,$bit,$song) = explode(",", $fp_data, 7);

if ($status == "1") {

echo "$chooseplayer<br>";
echo "<a href=http://$host:$port/listen.pls><img src=modules/mod_shoutcastextended/winamp.gif border=0 alt=listen with Winamp></a>&nbsp;<a href=modules/mod_shoutcastextended/listen.asx><img src=modules/mod_shoutcastextended/wmplayer.gif border=0 alt=listen with Window Media Player></a>&nbsp;";
echo "<a href=modules/mod_shoutcastextended/listen.ram><img src=modules/mod_shoutcastextended/realplayer.gif border=0 alt=listen with RealPlayer></a>&nbsp<a href=modules/mod_shoutcastextended/listen.m3u><img src=modules/mod_shoutcastextended/itunes.gif border=0 alt=listen with iTunes></a><br>";
echo "<font face='verdana' size='2' color='#800000'><b> $radioname </b></font><br><br> ";
echo "<font face=verdana size=1> <b>$listener</b>: $current $from $max ($reported Unique)<br> <b>$peakmenu</b>: $peak<br> <b>$serverstatus</b>: <font face='verdana' size='2' color='#009900'><b> Online</b></font><br> <b>Bitrate</b>: $bit Kbps<br> <b>$currentsong</b>: $song </font><br>";

} else {
echo "<font face='verdana' size='2' color='#000000'><b> $radioname </b></font><br><font face='verdana' size='2' color='#FF0000'><b> Offline </b></font>";
} }
?> </center> <br>
</div>


but on my computer in local under windows xp sp2 and with Easyphp it work perfectly without any error , file is
listen.asx
listen.ram
listen.m3u
it's a module under joomla to listen radio ...
 
Last edited:

Stryk0ur

New Member
Messages
42
Reaction score
0
Points
0
notice of this joomla module

<H2>Shoutcast Molok Extended
Shoutcast Molok Extended is a module that shows some basic info from shoutcast radio stations .
This module retrieve the following basic info from a shoutcast radio station::
  • Total listener
  • Peak
  • Server Status : Online or Offline
  • Bitrate
  • Current Song
With this Module you can:
  • Enter the name of the radio station
  • Configure the radio station I.P and Port number,
  • Change the module interface to your language,
  • Links autoplay with WinAmp, Window Media Player, Real Player or iTunes 1. in order to make autoplay streaming links for RealPlayer, Window Media Player and iTunes you need to edit 3 files

    listen.asx
    listen.ram
    listen.m3u

    the files are in streaminglinks.zip. by default the links are linking to my radio.

    2. open with notepad
    3. make change depend on your shoutcast IP Address and Port
    4. save
    5. upload to your server
    http://yoursite.com/modules/mod_shoutcastextended/
    or
    http://yoursite.com/joomla/modules/mod_shoutcastextended/

    NOTE!! if those links are not working, check your mime-setting in cPanel
Credit to Molok!
This is a extended Version of Shoutcast Molok Module by Arnold Wender
Original Version - Visit Mundo Bizarro
Extended Version - Visit fungkur's Network
</H2>


I have try to change port into config module to 80 and 8000 after I see myaradioname is offline so there aren't problem , but problem is that I am streaming on the port 3128 on another server so I cannot change it to 80 or 8000 ,so what I should do ?
 
Last edited:
Status
Not open for further replies.
Top