IRC Gateway
PHP Manual

ircg_list

(PHP 4 >= 4.3.3, PHP 5 <= 5.0.5)

ircg_list — List topic/user count of channel(s)

Descripción

bool ircg_list ( resource $connection , string $channel )

ircg_list() will request a list of users in the channel . The answer is sent to the output defined by ircg_set_file() or ircg_set_current().

Lista de parámetros

connection

A connection resource handle returned by ircg_pconnect().

channel

The channel name as #name.

Valores retornados

Devuelve TRUE si todo se llevó a cabo correctamente, FALSE en caso de fallo.

Ejemplos

Example#1 ircg_list() example

<?php

// connect to server
$id ircg_pconnect($nickname$ip$port);

// set to output to a file
ircg_set_file($id'irc_output.html');

// try to join a channel
if (!ircg_join($id$channel)) {
    echo 
"Cannot /join $channel<br />";
}

// send list command
ircg_list($id$channel);

// wait for output to arrive
sleep(5);

// disconnect
ircg_disconnect($id,'Bye World');

// output everything
readfile('irc_output.html');

?>

El resultado del ejemplo seria algo similar a:

...
Channel #channel has n users and the topic is 'Topic'
End of LIST
...

Ver también


IRC Gateway
PHP Manual