...and it worked! Sort of. I could authenticate myself and login to the msn server succesfully, then I could get a list of users and set my status to online -so far so good-, but then I tried to get into a conversation and all went wrong. Why? Because I needed to use threads to manage the connections to the switchboards (the conversations with other people) and PHP does not (yet) offer that functionality.
I'm still wondering if I should try to find a work-around to the thread problem or just start it all over in JAVA, C or Python, because after a long time of tweaking I did manage to send and receive some messages while using PHP, but I kept having problems managing the connections after two messages had been sent/received.
I will upload the script so that those of you who are interested in writing your own clients or bots can have a look. I don't think end-users would like this script too much, unless they want to see how the msn protocol works, what kind of information has been sent and received and how your messages and passwords are encrypted (they are not) because there is some extensive logging going on.
I will leave you with the links. You will need PHP and the php-cli module (command line interpreter) to make this work. Unpack the script to a directory, open a terminal (*NIX) or hit F3 and type cmd (Windows), 'cd' to the directory and type:
php MSNBot.php -u=username@hotmail.com -p=passwordto run the script.
No Comments
Be the first to leave a comment for this article ;)