473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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.php");
$t = new MezzengerKlient;
$t->debug=true;
$t->init("ma**@mail.com","password");
$t->login();
$t->main();
$t->quit();
?>
------------------------------------------------/
CODE-------------------------------------------------

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

function spam(){
global $t;
for ($i=0;isset($t->onlinefriends[$i]);$i++){
$cont=@split(' ',$t->onlinefriends[$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.php");
$t = new MezzengerKlient;
$t->debug=true;
$t->onLogin="change_nick";
$t->init("ma**@mail.com","password");
$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

Feb 6 '07 #1
2 2456
..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
Feb 6 '07 #2
On Feb 6, 7:40 am, Michael Fesser <neti...@gmx.dewrote:
.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!!

Feb 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Oscar Thornell | last post by:
Hi, I would like to create a tab in MSN Messenger like an addin...that uses the Messenger interface... My idea is to export data from a Web Service on wich the users can access information via...
1
by: msn | last post by:
I have plane to develop MSN messenger clone. And I wanna develop it using the latest MSN messenger API but I can't find any information about the latest MSN messenger API. Does anyone know about...
1
by: Nuno Magalhaes | last post by:
How can I build an echo server that replies all the RTP/RTCP packets of a audio/video conversation in MSN Messenger? DotMSN SDK and MSNP9 seems no to support this type of interaction. Any help...
2
by: Tee | last post by:
Hi, I need to make a window form that look the options winform in MSN Messenger 7. It is not using tab, but a list of available content on the left (a vertical menu), and a groupbox on the...
4
by: z | last post by:
Hello, I am currently learing Visual Basic, and I have a specific task in mind I would like to achieve, but am getting a bit lost. I use MSN Messenger to communicate with friends. You type the...
3
by: Amit Khemka | last post by:
Hello, I am trying to write an IM Bot, which automatically replies to a message, in Python. I was wondering If there are python modules for connecting to Yahoo!, msn networks ... ideally I would...
0
by: Michael | last post by:
I just wondered is there a reasonably easy way to send single messages over the msn messenger protacol from a php script, i dont even need to be able to reply to the script just a 2 word...
0
by: Page O Rama | last post by:
Hi, R U BLOCKED ON MSN,YAHOO,ICQ OR AOL Messenger By Your Friend, Then What are you waiting for.Visit one of the link below to find out who has blocked you in his/her friend list. MSN Block...
5
by: Gushe | last post by:
Hello all. Well, Since I have this Msn Plus! Live, I was very exited about the scripts system. I was also very obsessed with scripting, So I decided to try learning the Msn Plus! Live scripting. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.