View Full Version : Help with my radio
.:forgotten1:.
21-06-2006, 09:42 PM
I have a radio and i wanna know how to make a listener counter? or do i need to acctually buy a radio to have a listener counter?
DMB-Hosting
21-06-2006, 09:47 PM
Seriously you dont make sense.
"i have a radio"
then
"or do i need to buy a radio"
So you dont have one or do you?
.:forgotten1:.
21-06-2006, 09:49 PM
it's a pre-recorded radio :P i just record me djing and put it on my site
so can i get a radio counter?
DMB-Hosting
21-06-2006, 09:50 PM
So you dont have shoutCAST?
.:forgotten1:.
21-06-2006, 09:51 PM
no or any othe streaming program
DMB-Hosting
21-06-2006, 09:53 PM
Ok, you want ascript to say how many people are on your site?
.:forgotten1:.
21-06-2006, 09:55 PM
exactly :)
.:forgotten1:.
21-06-2006, 10:03 PM
:P kkkkk :P
Edited By Snoop-20(Forum Moderator): Please do not Double Post
DMB-Hosting
21-06-2006, 10:06 PM
I found this:
<?php
// Configuration
$dbhost = "localhost";
$dbuser = "[to-add]"; // MySQL Username
$dbpass = "[to-add]"; // MySQL Password
$dbname = "[to-add]"; // Database Name
$timeoutseconds = 1200; // length of session, 20 minutes is the standard
$timestamp=time();
$timeout=$timestamp-$timeoutseconds;
$ip = substr($REMOTE_ADDR, 0, strrpos($REMOTE_ADDR,"."));
// Connect to MySQL Database
@mysql_connect($dbhost,$dbuser,$dbpass);
@mysql_select_db($dbname) or die("No db");
// Add this user to database
$loopcap = 0;
while ($loopcap<3 && @mysql_query("insert into useronline values('$timestamp','$ip','$PHP_SELF')"))
{ // in case of collision
$timestamp = $timestamp+$ip{0}; $loopcap++;
}
// Delete users that have been online for more then "$timeoutseconds" seconds
@mysql_query("delete from useronline where timestamp<$timeout");
// Select users online
$result = @mysql_query("select distinct ip from useronline");
$user = @mysql_num_rows($result);
mysql_free_result($result);
@mysql_close();
// Show all users online
if ($user==1) {echo $user.' user online';} else {echo $user.' users online';}
?>
Obviously youll need a db- i searched the forum and found it
.:forgotten1:.
21-06-2006, 10:18 PM
whats a db? a data base? and what would i put as it?
DMB-Hosting
21-06-2006, 10:18 PM
Just create a database in cPanel or something presuming you have it
.:forgotten1:.
21-06-2006, 10:19 PM
ok is there one thats html only?
Flisker
28-06-2006, 05:49 AM
have you got freewebs ?
RLY-CRAIG?
28-06-2006, 10:21 AM
no or any othe streaming program
You need to buy some shoutcast hosting
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.