Dynamic Web Pages: deutschsprachiger PHP Knotenpunkt seit 1999

Dynamic Web Pages : deutschsprachiges PHP-Handbuch : ircg-list _

 
  PHP Journal  
  _  
 
<ircg_kick ircg_lookup_format_messages>
Letzte Aktualisierung: Mon, 17 Nov 2014
 

ircg_list

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

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

Description

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(). Gibt bei Erfolg TRUE zurück, im Fehlerfall FALSE.

Beispiel 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');

?>

This example will output something similar to:

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

See also: ircg_set_file(), ircg_set_current(), and ircg_who().



<ircg_kick ircg_lookup_format_messages>
Letzte Aktualisierung: Mon, 17 Nov 2014
 


powered by Hetzner
top Alle Rechte vorbehalten. © Dynamic Web Pages 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 top

Werbung an/aus Werbung aus Werbung an