Hello,
Is there anyway to grab what DJ is currently on air (from the timetable i should think?) and display the avatar on a page, so I can impliment it onto my site which has a 'Current DJ's Avatar' box.
Thanks
+REP
;;Tom

Hello,
Is there anyway to grab what DJ is currently on air (from the timetable i should think?) and display the avatar on a page, so I can impliment it onto my site which has a 'Current DJ's Avatar' box.
Thanks
+REP
;;Tom
Something like thatPHP Code:<?php
include("../includes/config.php");
include("../includes/functions.php");
$query = mysql_query("SELECT * FROM users WHERE level != 'banned'") or die('ERROR '.mysql_error());
while($rows = mysql_fetch_array($query)) {
if(preg_match("/". $rows[username] ."/i", $servertitle)) {
$name = "{$rows[username]}";
$check = mysql_query("SELECT * FROM users WHERE username = '$name'");
?>
<img src="<?php
$avatar = $account["avatar"];
if($avatar == "") {
echo("../images/no_ava.gif");
}
elseif($avatar == "images/no_ava.gif") {
echo("../images/no_ava.gif");
}
else {
echo("". $avatar ."");
}
?>" alt="<? echo("". $account["username"] .""); ?>'s avatar" />
<?php
}
}
?>
That grabs the server title checks if the DJ is registered in the panel and then displays their avatar.
Don't worryBecause people will use things like:
DJ Spike | HabboFM.co.uk
The script basically 'searches' for their username in the stream title.
So if their username was "Simon" and the stream title was "IYA!!1 DJ SIMON IZ ERE BLASTIN YA TUNEZ!!2", then it would still work I believe.
In /frontend/.
Want to hide these adverts? Register an account for free!