<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/19236" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2013-01-27T11:38:19-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/19236</id>

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2013-01-27T11:38:19-04:00</updated>

		<published>2013-01-27T11:38:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100797#p100797</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100797#p100797"/>
		<title type="html"><![CDATA[shoutcast.tcl, edit to show listeners from webpage code]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100797#p100797"><![CDATA[
I had a quick look at the page-info. Unfortunately, the JS-datasource provides that information as javascript functions, rather than simple variables. That makes automated parsing alittle harder than simply unpacking a JSON blob. Ideally, you'd use something like spidermonkey or rhino for the parsing, though I havn't tried linking eggdrop with spidermonkey to this day.<br><br>You could extract the data with some creative regular expressions;<div class="codebox"><p>Code: </p><pre><code>#Assuming we've already fetched http://media.streamingpulse.biz:2000/system/misc/scripts/streaminformation.js.php?id=42#and stored the content in $dataset idx [regexp -inline -indices -- {\.CURRENTLISTENERS} $data]regexp -start [lindex $idx 1] -- {return "([0-9]+)";} $data match listeners#number of listeners is now stored in $listeners#this will not check that streamStatus is true however...</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Jan 27, 2013 11:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-01-27T08:09:06-04:00</updated>

		<published>2013-01-27T08:09:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100786#p100786</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100786#p100786"/>
		<title type="html"><![CDATA[shoutcast.tcl, edit to show listeners from webpage code]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100786#p100786"><![CDATA[
Please tell us the direct tlink from that working page. We need to see the exact url path and its source code. The simple the page is like:<br><br>34 listeners<br>named radio station<br><br>The easier is it for us to make the request.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sun Jan 27, 2013 8:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Foekie_t]]></name></author>
		<updated>2012-12-23T20:44:00-04:00</updated>

		<published>2012-12-23T20:44:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100490#p100490</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100490#p100490"/>
		<title type="html"><![CDATA[shoutcast.tcl, edit to show listeners from webpage code]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100490#p100490"><![CDATA[
Hi,<br><br>I have a shoutcast server, but also a flashserver for my radio. Just as a hobby... The users for the shoutcast server, I can get with the shoutcast.tcl, like always. But now that I have the flashserver, I am not able to show the current listeners of that flashserver in the irc channel, which I would love to show... I have a code to get the listeners, but it's html, so I don't know how to add this to the tcl, to show the correct number in total en also seperate...<br><br>Like: Total Listeners: 50 ( Winamp: 25 ; Flash: 25 ) <br><br>See below the code, that is showing my listerners on a webpage. How can I get the users that are showing on this page also in the number of the shoutcast.tcl ??<br><br>Shoutcast.tcl <br><div class="codebox"><p>Code: </p><pre><code>if {$oldcurlist != $repl} {poststuff privmsg "  »» There are [lindex $repl 1] Listeners "}}</code></pre></div>Webpage CODE ( just add in html ):<br><div class="codebox"><p>Code: </p><pre><code>&lt;script type="text/javascript" src="http://media.streamingpulse.biz:2000/system/misc/scripts/streaminformation.js.php?id=42"&gt;&lt;/script&gt;&lt;table border="1" width="250"&gt;&lt;tr&gt;&lt;th&gt;&lt;script&gt;document.write(StreamInformation.SONGTITLE())&lt;/script&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center"&gt;&lt;script&gt;document.write(StreamInformation.CURRENTLISTENERS() +"/"+ StreamInformation.MAXLISTENERS() +" Listeners @ "+ StreamInformation.BITRATE() +"Kbps")&lt;/script&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</code></pre></div>Hope that someone can help me with this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br><br><br>Thanks and have a nice day.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8396">Foekie_t</a> — Sun Dec 23, 2012 8:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
