Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : IRC Gateway Functions

IRC Gateway Functions

Introduction

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

Note:

This extension has been moved to the » PECL repository and is no longer bundled with PHP as of PHP 5.1.0.

Installation

Detailed installation instructions can be found at » http://www.schumann.cx/ircg/. 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.

Runtime Configuration

This extension has no configuration directives defined in php.ini.

Resource Types

Predefined Constants

This extension has no constants defined.

Table of Contents

ircg_channel_mode — Set channel mode flags for user
ircg_disconnect — Close connection to server
ircg_eval_ecmascript_params — Decodes a list of JS-encoded parameters
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_names — Query visible usernames
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

Code Examples / Notes » ref.ircg

16-apr-2004 02:50

watch out, ircg is shareware as it seems.
Quoting from http://schumann.cx/ircg/ircg4.php :
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?


darkelder

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
";
       exit;
}
/* joining a channel                                                            */
if (!ircg_join($id,$channel))
{
       print "Cannot join to $chanell
";
}
/* 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!!!");
?>


malo

If sb need a simple PHP IRC Class:
http://sf.net/projects/irccc


zonakusu

I suggest you use a raw socket for connecting. It gives you more freedom to work with. And it is just more nice.
All that these commands would do is sending stuff like this to the server:
:nick@hostname PRIVMSG #channel :What you would like to say
To send a message to the channel "#channel".


Change Language


Follow Navioo On Twitter
.NET Functions
Apache-specific Functions
Alternative PHP Cache
Advanced PHP debugger
Array Functions
Aspell functions [deprecated]
BBCode Functions
BCMath Arbitrary Precision Mathematics Functions
PHP bytecode Compiler
Bzip2 Compression Functions
Calendar Functions
CCVS API Functions [deprecated]
Class/Object Functions
Classkit Functions
ClibPDF Functions [deprecated]
COM and .Net (Windows)
Crack Functions
Character Type Functions
CURL
Cybercash Payment Functions
Credit Mutuel CyberMUT functions
Cyrus IMAP administration Functions
Date and Time Functions
DB++ Functions
Database (dbm-style) Abstraction Layer Functions
dBase Functions
DBM Functions [deprecated]
dbx Functions
Direct IO Functions
Directory Functions
DOM Functions
DOM XML Functions
enchant Functions
Error Handling and Logging Functions
Exif Functions
Expect Functions
File Alteration Monitor Functions
Forms Data Format Functions
Fileinfo Functions
filePro Functions
Filesystem Functions
Filter Functions
Firebird/InterBase Functions
Firebird/Interbase Functions (PDO_FIREBIRD)
FriBiDi Functions
FrontBase Functions
FTP Functions
Function Handling Functions
GeoIP Functions
Gettext Functions
GMP Functions
gnupg Functions
Net_Gopher
Haru PDF Functions
hash Functions
HTTP
Hyperwave Functions
Hyperwave API Functions
i18n Functions
IBM Functions (PDO_IBM)
IBM DB2
iconv Functions
ID3 Functions
IIS Administration Functions
Image Functions
Imagick Image Library
IMAP
Informix Functions
Informix Functions (PDO_INFORMIX)
Ingres II Functions
IRC Gateway Functions
PHP / Java Integration
JSON Functions
KADM5
LDAP Functions
libxml Functions
Lotus Notes Functions
LZF Functions
Mail Functions
Mailparse Functions
Mathematical Functions
MaxDB PHP Extension
MCAL Functions
Mcrypt Encryption Functions
MCVE (Monetra) Payment Functions
Memcache Functions
Mhash Functions
Mimetype Functions
Ming functions for Flash
Miscellaneous Functions
mnoGoSearch Functions
Microsoft SQL Server Functions
Microsoft SQL Server and Sybase Functions (PDO_DBLIB)
Mohawk Software Session Handler Functions
mSQL Functions
Multibyte String Functions
muscat Functions
MySQL Functions
MySQL Functions (PDO_MYSQL)
MySQL Improved Extension
Ncurses Terminal Screen Control Functions
Network Functions
Newt Functions
NSAPI-specific Functions
Object Aggregation/Composition Functions
Object property and method call overloading
Oracle Functions
ODBC Functions (Unified)
ODBC and DB2 Functions (PDO_ODBC)
oggvorbis
OpenAL Audio Bindings
OpenSSL Functions
Oracle Functions [deprecated]
Oracle Functions (PDO_OCI)
Output Control Functions
Ovrimos SQL Functions
Paradox File Access
Parsekit Functions
Process Control Functions
Regular Expression Functions (Perl-Compatible)
PDF Functions
PDO Functions
Phar archive stream and classes
PHP Options&Information
POSIX Functions
Regular Expression Functions (POSIX Extended)
PostgreSQL Functions
PostgreSQL Functions (PDO_PGSQL)
Printer Functions
Program Execution Functions
PostScript document creation
Pspell Functions
qtdom Functions
Radius
Rar Functions
GNU Readline
GNU Recode Functions
RPM Header Reading Functions
runkit Functions
SAM - Simple Asynchronous Messaging
Satellite CORBA client extension [deprecated]
SCA Functions
SDO Functions
SDO XML Data Access Service Functions
SDO Relational Data Access Service Functions
Semaphore
SESAM Database Functions
PostgreSQL Session Save Handler
Session Handling Functions
Shared Memory Functions
SimpleXML functions
SNMP Functions
SOAP Functions
Socket Functions
Standard PHP Library (SPL) Functions
SQLite Functions
SQLite Functions (PDO_SQLITE)
Secure Shell2 Functions
Statistics Functions
Stream Functions
String Functions
Subversion Functions
Shockwave Flash Functions
Swish Functions
Sybase Functions
TCP Wrappers Functions
Tidy Functions
Tokenizer Functions
Unicode Functions
URL Functions
Variable Handling Functions
Verisign Payflow Pro Functions
vpopmail Functions
W32api Functions
WDDX Functions
win32ps Functions
win32service Functions
xattr Functions
xdiff Functions
XML Parser Functions
XML-RPC Functions
XMLReader functions
XMLWriter Functions
XSL functions
XSLT Functions
YAZ Functions
YP/NIS Functions
Zip File Functions
Zlib Compression Functions
eXTReMe Tracker