Parse error :(
Parse error :(
Well, i have installed the radio tool box package ... then the catcher.php and it seems to have a slight problem.
When there is more than one server and the song include a ' ... i just get a parse error ... he doesn't seems to addslashes() to server2.
Any infos around ?
N.B: look at the second $server[2]['current_song']='NO DOUBT - Don't speak'; ... he doesn't add \ in front of 't speak
When there is more than one server and the song include a ' ... i just get a parse error ... he doesn't seems to addslashes() to server2.
Any infos around ?

N.B: look at the second $server[2]['current_song']='NO DOUBT - Don't speak'; ... he doesn't add \ in front of 't speak
Code: Select all
<?php
$server[0]['ip']='www.gamearena-radio.com:8000';
$server[0]['type']='SHOUTcast';
$server[0]['listeners']='2';
$server[0]['max_listeners']='10';
$server[0]['bitrate']='128';
$server[0]['status']='Online';
$server[0]['desc']='GameArena-Radio -o- LA webradio des Gamers qui déchire le web -o- www.GameArena-Radio.com';
$server[0]['current_song']='NO DOUBT - Don\'t speak';
$server[1]['ip']='www.roxorgamers.com:8000';
$server[1]['type']='SHOUTcast';
$server[1]['listeners']='';
$server[1]['max_listeners']='';
$server[1]['bitrate']='';
$server[1]['status']='Offline (Connection Failed)';
$server[1]['desc']='';
$server[1]['current_song']='';
$server[2]['ip']='193.24.229.4:9020';
$server[2]['type']='SHOUTcast';
$server[2]['listeners']='2';
$server[2]['max_listeners']='100';
$server[2]['bitrate']='128';
$server[2]['status']='Online';
$server[2]['desc']='GameArena-Radio -o- LA webradio des Gamers qui déchire le web -o- www.GameArena-Radio.com';
$server[2]['current_song']='NO DOUBT - Don't speak';
$current_song='Précédemment: ZAZIE - Zen';
$listeners='4';
$max_listeners='110';
$touch_interval='30';
?>
-
- Posts: 4
- Joined: Thu Sep 30, 2004 9:58 pm
- Location: Johnstown, PA
- Contact:
Same Problem
Hey, I'm also having the same problem with my radio toolbox on m site. Every time there is a song played that contains a singe apostrophe, things go haywire. The only way it gets fixed is if I go in and manually edit the includes.php files manually. Hopefully he gets this fixed.
-
- Posts: 4
- Joined: Thu Sep 30, 2004 9:58 pm
- Location: Johnstown, PA
- Contact:
I Think I Might Have Fixed It...
Hey Jay, I think I might have found the problems:
On the lines
and
there needs to be the addslashes() function on the variables that the arrays are equal to. So it would look something like this:
and
Code: Select all
for($i=0; $i<$list_size; $i++){
$server_vars=array('ip', 'type', 'listeners', 'max_listeners', 'bitrate', 'status', 'desc', 'current_song');
for($j=0; $j<count($server_vars); $j++){
$data.="\$server[$i]['$server_vars[$j]']=";
$data.='\''.$server[$i][$j].'\';';
$data.="\r\n";
$rtb_array[$i][$server_vars[$j]] = $server[$i][$j];
}
}
$data.="\r\n";
$total_var_name=array('current_song', 'listeners', 'max_listeners', 'touch_interval');
$total_var_var=array('tit', 'l', 'ml', 'ti');
for($j=0; $j<count($total_var_name); $j++){
$data.="\$$total_var_name[$j]='${$total_var_var[$j]}';\r\n";
$rtb_array['default'][$total_var_name[$j]] = $$total_var_var[$j];
}
Code: Select all
$rtb_array[$i][$server_vars[$j]] = $server[$i][$j];
Code: Select all
$rtb_array['default'][$total_var_name[$j]] = $$total_var_var[$j];
Code: Select all
$rtb_array[$i][$server_vars[$j]] = addslashes($server[$i][$j]);
Code: Select all
$rtb_array['default'][$total_var_name[$j]] = addslashes($$total_var_var[$j]);
-
- Posts: 4
- Joined: Thu Sep 30, 2004 9:58 pm
- Location: Johnstown, PA
- Contact:
same errors
still getting the same errors with or without the server details
-
- Posts: 4
- Joined: Thu Sep 30, 2004 9:58 pm
- Location: Johnstown, PA
- Contact: