PHP scripts |  Linux howtos |  c scripts |  hosting |  gallerys |  s2k 

  1.0 Home  
  2.0 PHP scripts  
  3.0 Other scripts  
  4.0 Pages hosted here  
  5.0 Personal gallery  


PHP script: get #chan users from bot
current version: /
last updated - feb. 2004

This is small script that connects to eggdrop via telnet and execute eggdrop command .channel #mychan then returns #channel users as array. We can print #channel users on the web page:

on the channel #mychan is 9 users:
ops (2) are :
 foo- _moo_
voices (3) are :
 mickey RoCkEr Mario
others (4) are: 
 lammer PIKEC2 mooro^ _kid0_

Here is simple example how can you use this in your page. Just call function listusers() and print returned array:

1: <?php
$rr listusers();
<p>on the channel #mychan is <?php echo($rr['nr_ops']+$rr['nr_voices']+$rr['nr_others'])?> users! </p>
6: <p>ops (<?php echo $rr['nr_ops']?>) are: <?php echo $rr['ops']?></p>
7: <p>voices (<?php echo $rr['nr_voices']?>) are <?php echo $rr['voices']?></p>
8: <p>others (<?php echo $rr['nr_others']?>) are <?php echo $rr['others']?></p>


download source (tar.gz)
view source code

OLD: /

tested on: linux