PHP: IRC Gateway Functions - Manual
PHP  
downloads | documentation | faq | getting help | mailing lists | | php.net sites | links | my php.net 
search for in the  
<ingres_rollbackircg_channel_mode>
view the version of this page
Last updated: Thu, 15 Jul 2004

XLVIII. IRC Gateway Functions

�vod

With IRCG you can rapidly stream XML data to thousands of concurrently connected users. This can be used to build powerful, extensible interactive platforms such as online games and webchats. IRCG also features support for a non-streaming mode where a helper application reformats incoming data and supplies static file snippets in special formats such as cHTML (i-mode) or WML (WAP). These static files are then delivered by the high-performance web server.

Up to v4, IRCG runs under these platforms:

  • AIX

  • FreeBSD

  • HP-UX

  • Irix

  • Linux

  • Solaris

  • Tru64

  • Windows

Instalace

Detailed installation instructions can be found at . We urge you to use the provided installation script.

It is not recommended, but you can try enable IRCG support yourself. Provide the path to the ircg-config script, --with-ircg-config=path/to/irc-config and in addition add --with-ircg to your configure line.

Konfigurace b�hu

Toto roz���en� nem� definov�no ��dn� konfigura�n� direktivy.

P�eddefinovan� konstanty

Toto roz���en� nem� definov�ny ��dn� konstanty.

Obsah
ircg_channel_mode --  Set channel mode flags for user
ircg_disconnect --  Close connection to server
ircg_fetch_error_msg --  Returns the error from previous IRCG operation
ircg_get_username --  Get username for connection
ircg_html_encode --  Encodes HTML preserving output
ircg_ignore_add --  Add a user to your ignore list on a server
ircg_ignore_del --  Remove a user from your ignore list on a server
ircg_invite -- Invites nickname to channel
ircg_is_conn_alive --  Check connection status
ircg_join --  Join a channel on a connected server
ircg_kick --  Kick a user out of a channel on server
ircg_list -- List topic/user count of channel(s)
ircg_lookup_format_messages --  Check for the existence of a format message set
ircg_lusers -- IRC network statistics
ircg_msg --  Send message to channel or user on server
ircg_nick --  Change nickname on server
ircg_nickname_escape --  Encode special characters in nickname to be IRC-compliant
ircg_nickname_unescape --  Decodes encoded nickname
ircg_notice --  Send a notice to a user on server
ircg_oper -- Elevates privileges to IRC OPER
ircg_part --  Leave a channel on server
ircg_pconnect --  Connect to an IRC server
ircg_register_format_messages --  Register a format message set
ircg_set_current --  Set current connection for output
ircg_set_file --  Set logfile for connection
ircg_set_on_die --  Set action to be executed when connection dies
ircg_topic --  Set topic for channel on server
ircg_who -- Queries server for WHO information
ircg_whois --  Query server for user information


add a note add a note User Contributed Notes
IRC Gateway Functions
16-Apr-2004 01:50
watch out, ircg is shareware as it seems.
Quoting from :
The IRCG 4 Free Trial does not allow more than 10 concurrent connections
Answer: The IRCG 4 Free Trial is limited to 10 concurrent connections. You can buy an unlimited license by contacting us here.

Poor job, documentation team. Do you like promoting shareware in your manual just because its from a core developer?
meebey at php dot net
02-Jun-2003 11:23
If you just need an IRC client/bot in PHP without this IRCG extension, you want to look at the PEAR::SmartIRC class. Here the direct link to this class:
darkelder at php dot net
12-Nov-2002 05:16
This is an example to show how to connect to a IRC server, how to join a channel, send and receive messages.

<?PHP

/* change it to your own nickname                                              */
$nickname              = "myOwnNick";
/* choice your irc server                                                      */
$server                = "irc.brasirc.net";
/* change to your channel                                                      */
$channel                = "#linux";
/* do not change it if you do not know what means :-)                          */
$port                  = "6667";

/* as ircg cannot resolve hosts, we use PHP internal function to get the IP    */
$ip                    = gethostbyname($server);

/* connection                                                                  */
$id                    = ircg_pconnect($nickname,$ip,$port);

/* checking if  connected                                                      */
if (!ircg_is_conn_alive($id))
{
       print
"Cannot connect<br>";
       exit;
}

/* joining a channel                                                            */
if (!ircg_join($id,$channel))
{
       print
"Cannot join to $chanell<br>";
}

/* getting messages - you must have this in your php file                      */
ircg_set_current($id);

/* send messages to your channel and you                                        */
ircg_msg($id,$channel,"Hello $channel!!");
ircg_msg($id,$nickname,"This message goes to me!!!");

?>
ssruprai at hotmail dot com
03-May-2002 01:55
You may face problems with php 4.20 configure script when using "--with-ircg-config" without providing any path to script file. When it tries to configure ircg it just starts printing --ldflags continuously.

checking for IRCG support... yes
--ldflags
--ldflags
--ldflags
--ldflags
--ldflags
--ldflags
--ldflags
--ldflags

So always provide path to ircg-config file as in --with-ircg-config=/user/local/bin/ircg-config

<ingres_rollbackircg_channel_mode>
 Last updated: Thu, 15 Jul 2004
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2004 The PHP Group
All rights reserved.
This unofficial mirror is operated at: /
Last updated: Sun Nov 14 23:09:54 2004 Local time zone must be set--see zic manual page