Cheap Web Hosting for Developers

PHP, MySQL, Java, Unix Cheap Web Hosting

114 Chapter 3 Application Design: A Real-Life Example

Filed under: PHP Web Hosting — webmaster @ 20:32

Interfacing the Network 115 // This is an example for a callback function. See below on how to register // and remove it from the call chain. // // $code specifies the reason for invocation, $parameter contains all callback // information. // // The return value should always consist of a modified or unmodified version // of the input parameter $parameter. The return value is used as input // parameter for the next callback. This allows for multi-stage message // processing and such. // ////////////////////////////////////////////////////////////////////////////// function myplugin_idle_callback($code, $parameter) { return($parameter); } ////////////////////////////////////////////////////////////////////////////// // // myplugin_init() - initializes this plug-in // ////////////////////////////////////////////////////////////////////////////// // // Put all your initialization code in here. This code will be called as soon // as the main bot is all set up with connecting and callback installation; // thus, you can rely on a safe environment. // // Although the return value is currently not used, 0 should indicate // initialization failure and 1 initialization success. This might be used // later on to enable plug-ins to stop the current chat session right after // login. // ////////////////////////////////////////////////////////////////////////////// // // Return value: // 0 - error // 1 - success // ////////////////////////////////////////////////////////////////////////////// function myplugin_init() { // register callbacks here chat_register_callback(CHATCB_IDLE, myplugin_idle_callback ); return(1); continues

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

9 Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Cheap Web Hosting