<?xml version="1.0" encoding="windows-1252"?>
<node id="52692" title="Live365 Broadcaster Info grabber" created="2001-01-18 03:13:11" updated="2005-08-11 05:54:34">
<type id="1748">
sourcecode</type>
<author id="36912">
thealienz1</author>
<data>
<field name="doctext">
&lt;CODE&gt;
#needs these to get the html file from live365.com
use LWP::Simple;

#type in your username(aka: broadcaster's name) here
#print "Username: ";
#$username = &lt;STDIN&gt;;
#chomp($username);
$username="thealienz";

#Creates URL
$url = 'http://www.live365.com/cgi-bin/directory.cgi?genre=search&amp;searchdesc=' . $username . '&amp;searchfields=H';

print "Getting Stats - ";
unless (defined ($page = get($url))) {
	die "ERROR - There was an error getting URL: $URL\n";
}
print "Done\n";

print "Profile: $usrename\n";

#Checks the description
if($page =~ m|&lt;TD ID="desc".*?&gt;&lt;a class="desc".*?&gt;(.*?)&lt;/a&gt;&lt;/TD&gt;|i) {
	print "Description:\n$1\n";
}

#Checks to see what your connection speed is
if($page =~ m|&lt;TD ID="connection".*?&gt;(.*?)&lt;/TD&gt;|i) {
	print "Speed: $1\n";
}

#Checks how many people are listening
if($page =~ m|&lt;TD ID="listen".*?&gt;(.*?)&lt;/TD&gt;|i) {
	if($1 =~ m|DrawListenerStars\("/scp/\.\./images/", (\d+), (\d+)\)|i) {
		($listen,$outof) = ($1,$2);
	} else{
		($listen,$outof) = split(/\//,$1);
	}
	print "Listeners: $listen / $outof\n";
}
&lt;/CODE&gt;</field>
<field name="codedescription">
I was working one day on setting up an radio station on live365.com, and I noticed that their main http site was really slow. So, what I did was made a script that checks my broadcasting information really fast. Thanks PERL.
Basically all you have to do is type in the username and the script does the rest for you. You do have to make sure that you do have the LWP modules installed. Otherwise I trust that you know how to use this trully useless script. Thanks PERL.</field>
<field name="codecategory">
Web Stuff</field>
<field name="codeauthor">
thealienz@zdnetmail.com</field>
</data>
</node>
