<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Help with ereg_replace in shoucast new php</title>
		<link>https://www.cotonti.com</link>
		<description>Последние сообщения в теме</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 18 Apr 2026 18:19:03 -0000</pubDate>

		<item>
			<title>Pimenta</title>
			<description><![CDATA[<p>
	Okey all have been fixed will make it public for download :)</p>
]]></description>
			<pubDate>пт, 21 окт 2011 09:52:33 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ru/forums?m=posts&q=6566&d=0#post31061]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	Better use preg_replace() instead. Try <a href="http://www.cotonti.com/pastebin/153">this one</a>.</p>
]]></description>
			<pubDate>пт, 21 окт 2011 07:27:39 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ru/forums?m=posts&q=6566&d=0#post31058]]></link>
		</item>
		<item>
			<title>Pimenta</title>
			<description><![CDATA[<p>
	Thanks now I am getting this</p>
<pre class="brush:php;">
HTTP/1.0 200 OK Content-Type:text/xml ]&gt;23999168pophttp://www.n3rdnl.nln3rd![NL] AuroDJ - www.n3rdnl.nlThe Sunclub - The Ultimate Dance Top 100 2009 - Te Te (Shake That Heaven)N/AN/AN/A4921301128audio/mpeg1.9.81000290007300000000270011994.212.254.42MPEG OVERRIDE0108212594.212.254.42MPEG OVERRIDE08101291319145930131914572813191455211319145363131914514713191449521319144771131914460013191444021319144215 : Missing HTTP/1.0 200 OK Content-Type:text/xml ]&gt;23999168pophttp://www.n3rdnl.nln3rd![NL] AuroDJ - www.n3rdnl.nlThe Sunclub - The Ultimate Dance Top 100 2009 - Te Te (Shake That Heaven)N/AN/AN/A4921301128audio/mpeg1.9.81000290007300000000270011994.212.254.42MPEG OVERRIDE0108212594.212.254.42MPEG OVERRIDE08101291319145930131914572813191455211319145363131914514713191449521319144771131914460013191444021319144215 : Missing HTTP/1.0 200 OK Content-Type:text/xml ]&gt;23999168pophttp://www.n3rdnl.nln3rd![NL] AuroDJ - www.n3rdnl.nlThe Sunclub - The Ultimate Dance Top 100 2009 - Te Te (Shake That Heaven)N/AN/AN/A4921301128audio/mpeg1.9.81000290007300000000270011994.212.254.42MPEG OVERRIDE0108212594.212.254.42MPEG OVERRIDE08101291319145930131914572813191455211319145363131914514713191449521319144771131914460013191444021319144215 : Missing HTTP/1.0 200 OK Content-Type:text/xml ]&gt;23999168pophttp://www.n3rdnl.nln3rd![NL] AuroDJ - www.n3rdnl.nlThe Sunclub - The Ultimate Dance Top 100 2009 - Te Te (Shake That Heaven)N/AN/AN/A4921301128audio/mpeg1.9.81000290007300000000270011994.212.254.42MPEG OVERRIDE0108212594.212.254.42MPEG OVERRIDE08101291319145930131914572813191455211319145363131914514713191449521319144771131914460013191444021319144215 : Missing HTTP/1.0 200 OK Content-Type:text/xml ]&gt;23999168pophttp://www.n3rdnl.nln3rd![NL] AuroDJ - www.n3rdnl.nlThe Sunclub - The Ultimate Dance Top 100 2009 - Te Te (Shake That Heaven)N/AN/AN/A4921301128audio/mpeg1.9.81000290007300000000270011994.212.254.42MPEG OVERRIDE0108212594.212.254.42MPEG OVERRIDE08101291319145930131914572813191455211319145363131914514713191449521319144771131914460013191444021319144215 : Missing HTTP/1.0 200 OK Content-Type:text/xml ]&gt;23999168pophttp://www.n3rdnl.nln3rd![NL] AuroDJ - www.n3rdnl.nlThe Sunclub - The Ultimate Dance Top 100 2009 - Te Te (Shake That Heaven)N/AN/AN/A4921301128audio/mpeg1.9.81000290007300000000270011994.212.254.42MPEG OVERRIDE0108212594.212.254.42MPEG OVERRIDE08101291319145930131914572813191455211319145363131914514713191449521319144771131914460013191444021319144215 : Missing 1319145930 : Presen</pre>
]]></description>
			<pubDate>чт, 20 окт 2011 21:26:21 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ru/forums?m=posts&q=6566&d=0#post31053]]></link>
		</item>
		<item>
			<title>Kaan</title>
			<description><![CDATA[<p>
	ereg_replace change to str_replace</p>
<p>
	strtolower change to mb_strtolower</p>
]]></description>
			<pubDate>чт, 20 окт 2011 21:11:08 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ru/forums?m=posts&q=6566&d=0#post31052]]></link>
		</item>
		<item>
			<title>Pimenta</title>
			<description><![CDATA[<p>
	Hello</p>
<p>
	I need some help with php ereg_replace is not working the new php so I need some help with the shoutcast plugin</p>
<p>
	 </p>
<pre class="brush:php;">
&lt;?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_SED]
File=plugins/shoutcast/shoutcast.php
Version=101
Updated=2005-jan-5
Type=Plugin
Author=?
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=shoutcast
Part=index
File=shoutcast
Hooks=header.tags
Tags=header.tpl:{RADIO_STATUS},{RADIO_BITRATE},{RADIO_TITLE},{RADIO_LISTENERS},{RADIO_AIM},{RADIO_ICQ},{RADIO_CURRENTSONG}
Minlevel=0
Order=11
[END_SED_EXTPLUGIN]

==================== */

if ( !defined('SED_CODE') ) { die("Wrong URL."); }

$scip = $cfg['plugin']['shoutcast']['radio_ip'];
$scport = $cfg['plugin']['shoutcast']['radio_port'];
$scpass = $cfg['plugin']['shoutcast']['radio_pass'];

$scfp = @fsockopen("$scip", $scport, &amp;$errno, &amp;$errstr, 10);
 if(!$scfp) {
  $scsuccs=1;
 }
if($scsuccs!=1){
 fputs($scfp,"GET /admin.cgi?pass=".$scpass."&amp;mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
 while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
 }

 $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "AIM", "ICQ");
 $y=0;
 while($loop[$y]!=''){
  $pageed = ereg_replace(".*&lt;$loop[$y]&gt;", "", $page);
  $scphp = strtolower($loop[$y]);
  $$scphp = ereg_replace("&lt;/$loop[$y]&gt;.*", "", $pageed);
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==AIM || $loop[$y]==ICQ)
   $$scphp = utf8_decode($$scphp);
  $y++;
 }

 $pageed = ereg_replace(".*&lt;SONGHISTORY&gt;", "", $page);
 $pageed = ereg_replace("&lt;SONGHISTORY&gt;.*", "", $pageed);
 $songatime = explode("&lt;SONG&gt;", $pageed);
 $r=1;
 while($songatime[$r]!=""){
  $a=$r-1;
  $radio_playedat[$a] = ereg_replace(".*&lt;PLAYEDAT&gt;", "", $songatime[$r]);
  $radio_playedat[$a] = ereg_replace("&lt;/PLAYEDAT&gt;.*", "", $radio_playedat[$a]);
  $radio_song[$a] = ereg_replace(".*&lt;TITLE&gt;", "", $songatime[$r]);
  $radio_song[$a] = ereg_replace("&lt;/TITLE&gt;.*", "", $radio_song[$a]);
  $radio_song[$a] = utf8_decode($radio_song[$a]);
  $radio_dj[$a] = ereg_replace(".*&lt;SERVERTITLE&gt;", "", $page);
  $radio_dj[$a] = ereg_replace("&lt;/SERVERTITLE&gt;.*", "", $pageed);
$r++;
 }

$rad_cursong = $radio_song[0];
fclose($scfp);
}

$radio_url = "http://$scip:$scport";
$radio_wmp = "&lt;object id=\"objMediaPlayer\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" width=\"300\" height=\"70\" type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715\" standby=\"Loading Microsoft Windows Media Player components...\"&gt;&lt;param name=\"src\" value=\"$radio_url\"&gt;&lt;param name=\"console\" value=\"one\" /&gt;&lt;param name=\"showcontrols\" value=\"True\" /&gt;&lt;param name=\"showstatusBar\" value=\"True\" &gt;&lt;param name=\"showdisplay\" value=\"false\" /&gt;&lt;param name=\"autostart\" value=\"true\" /&gt;&lt;param name=\"animationatstart\" value=\"false\" /&gt;&lt;param name=\"backgroundcolor\" value=\"#ffffff\" /&gt;&lt;param name=\"center\" value=\"true\" /&gt;&lt;param name=\"autosize\" value=\"false\" /&gt;&lt;param name=\"displaysize\" value=\"0\" /&gt;&lt;param name=\"volume\" value=\"-1\" /&gt;&lt;embed src=https://www.cotonti.com/\"$radio_url\" type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" name=\"objMediaPlayer\" width=\"300\" autosize=\"false\" showdisplay=\"false\" displaysize=\"0\" height=\"70\" center=\"true\" autostart=\"True\"&gt;&lt;/embed&gt;&lt;/object&gt;";
$radio_real = "&lt;object id=video1 classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" height='70' width='300'&gt;&lt;param name=\"controls\" value=\"ControlPanel,StatusBar\" /&gt;&lt;param name=\"console\" value=\"Clip1\" /&gt;&lt;param name=\"autostart\" value=\"true\" /&gt;&lt;param name=\"volume\" value=\"-1\" /&gt;&lt;param name=\"src\" value=\"$radio_url\"&gt;&lt;embed src=https://www.cotonti.com/\"$radio_url\" type=\"audio/x-pn-realaudio-plugin\" console=\"Clip1\" controls=\"ControlPanel,StatusBar\" height='70' width='300' autostart='false'&gt;&lt;/embed&gt;&lt;/object&gt;";

	$t-&gt; assign(array(
	"RADIO_STATUS" =&gt; $streamstatus,
	"RADIO_BITRATE" =&gt; $bitrate,
	"RADIO_TITLE" =&gt; $servertitle,
	"RADIO_LISTENERS" =&gt; $currentlisteners,
	"RADIO_AIM" =&gt; $aim,
	"RADIO_ICQ" =&gt; $icq,
	"RADIO_CURRENTSONG" =&gt; $rad_cursong,
	"RADIO_STREAMURL" =&gt; $radio_url,
	"RADIO_WMP" =&gt; $radio_wmp,
	"RADIO_REAL" =&gt; $radio_real,
		));
	$t-&gt;parse("MAIN.RADIO");
?&gt;
</pre>
<p>
	 </p>
<p>
	 </p>
]]></description>
			<pubDate>чт, 20 окт 2011 18:45:12 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ru/forums?m=posts&q=6566&d=0#post31045]]></link>
		</item>
	</channel>
</rss>