Mzk - Mezzenger Klient (php Class), Class for making PHP bots and webmessengers (MSN Messenger)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SirDarckCat

    Mzk - Mezzenger Klient (php Class), Class for making PHP bots and webmessengers (MSN Messenger)

    Hello

    I have made a PHP class for making bots and webmessengers with PHP.

    Its use is very simple for example:

    This function will simply login to the .NET Passport account.. and
    show the response of the server.
    -------------------------------------------------
    CODE-------------------------------------------------
    <?php
    include("mzk.ph p");
    $t = new MezzengerKlient ;
    $t->debug=true;
    $t->init("mail@mai l.com","passwor d");
    $t->login();
    $t->main();
    $t->quit();
    ?>
    ------------------------------------------------/
    CODE-------------------------------------------------

    This function will say "Hello" to all contacts online.
    -------------------------------------------------
    CODE-------------------------------------------------
    <?php
    include("mzk.ph p");
    $t = new MezzengerKlient ;
    $t->debug=true;
    $t->onLogin="spam" ;
    $t->init("mail@mai l.com","passwor d");
    $t->login();
    $t->main();
    $t->quit();

    function spam(){
    global $t;
    for ($i=0;isset($t->onlinefriend s[$i]);$i++){
    $cont=@split(' ',$t->onlinefriend s[$i]);
    $t->MessageToNew($ cont[0],"Hello");
    }
    }
    ?>
    ------------------------------------------------/
    CODE-------------------------------------------------

    This function will change the bot's nick to "I am a bot" when logged
    in.
    -------------------------------------------------
    CODE-------------------------------------------------
    <?php
    include("mzk.ph p");
    $t = new MezzengerKlient ;
    $t->debug=true;
    $t->onLogin="chang e_nick";
    $t->init("mail@mai l.com","passwor d");
    $t->login();
    $t->main();
    $t->quit();

    function change_nick(){
    global $t;
    $t->setNick('I am a bot');
    }
    ?>
    ------------------------------------------------/
    CODE-------------------------------------------------

    The project page is: http://code.google.com/p/mzk/
    The documentation of the use of the class can be found in the wiki.
    The code can be found here: http://mzk.googlecode.com/svn/trunk/

    The difference between this class and others is that this is commented
    in english (the other one I found was in chinese), uses Events :P and
    is fully documented.

    Later I will add compatibility for exchanging "emoticons" and file
    transfer.. :)

    Thats all and I hope its usefull ;)
    Greetz!!

    PS.
    More examples can be found at the download section here (a contact
    grabber and a bot): http://code.google.com/p/mzk/downloads/list

  • Michael Fesser

    #2
    Re: Mzk - Mezzenger Klient (php Class), Class for making PHP bots and webmessengers (MSN Messenger)

    ..oO(SirDarckCa t)
    >I have made a PHP class for making bots and webmessengers with PHP.
    >[...]
    Just some short notes after having a quick look at the beginning of the
    class:

    * You don't have to use your own urlencode() function, rawurlencode()
    exists.

    * The Event() method is really ugly because of the fixed-length argument
    list and the use of eval(). It can be written shorter and more elegantly
    by using func_get_args() and call_user_func_ array().

    Micha

    Comment

    • SirDarckCat

      #3
      Re: Mzk - Mezzenger Klient (php Class), Class for making PHP bots and webmessengers (MSN Messenger)

      On Feb 6, 7:40 am, Michael Fesser <neti...@gmx.de wrote:
      .oO(SirDarckCat )
      >
      I have made a PHP class for making bots and webmessengers with PHP.
      [...]
      >
      Just some short notes after having a quick look at the beginning of the
      class:
      >
      * You don't have to use your own urlencode() function, rawurlencode()
      exists.
      >
      * The Event() method is really ugly because of the fixed-length argument
      list and the use of eval(). It can be written shorter and more elegantly
      by using func_get_args() and call_user_func_ array().
      >
      Micha
      Hi Mitcha!
      I will take into consideration the 2 functions for handling events, I
      didnt new about their existance :P, about the rawurlencode function,
      it will be implemented ASAP, thanks a lot :D.

      Greetz!!

      Comment

      Working...