Following up on my last post about the updated sendMsg script, I have another update available.
This update will now catch error 800 from the server. The server imposes a limit of creating 8 IM sessions in any 60 second period and will throw this error if you try calling createSession a 9th time. As such, the script is not suited for sending messages to more than 8 contacts in the same login session. All other changes are programming improvements.
This will be the final update for a while, if there are any major bugs reported I will fix them, otherwise consider this stable.
Download and check out Troubleshooting phpListGrab if you are having connecting problems (phpListGrab uses the same code base). I will also be posting more troubleshooting information for other problems I have recently discovered with server configuration compatibility.
The script I created over two years ago to send a message using PHP has gained quite a lot of exposure over the last few months, and a common request I have been getting is the ability to send messages to more than one user.
Over the weekend I modified the class with the following changes:
- Function to manually create an IM session with a user.
-
- Function to send a message on the newest IM session.
- Font face and colour support for the sendMessage() function.
- Better error handling when connecting to the messenger server.
- simpleSend() function to send a single message like the original version.
- error property to get socket error.
After just four days of being online, IMified’s Windows Live Messenger bot reached service limits, preventing new users from adding it and seeing its online presence. A week later they were turned down for requests to remove the limit for the service so the bot remained in a problematic state.
The latest blog entry states the issue with Microsoft is still up in the air, but it appears Microsoft isn’t so evil after all, listens to customers, and opened the bot up.
imified@imified.com is currently responding normally and appearing online for new users, the address on the homepage is also no longer striked out, so hopefully this will be the last this bots problems for a while.
Published on
3 years, 3 months ago in
MSNP.
Tags: bot, MSNP.
At the start of January, Todd Biggs responded to a question at the MSDN forums about third party clients which connect to the .NET Messenger Service. He explains that there is only one client which is licensed to connect to the network, the Reuters Messaging client. Additionally, there are various ISV programs and services, ie. bots.
Although this really just tells us about the licensing information we already know, many people ask about it and here is the answer again. My question is, if you use or create and unlicensed client, what’s going to happen? Nothing has happened in the 2+ years since the licensing was introduced.
The terms of service states the following under section 3:
You may only use Microsoft software or authorized third-party software to sign into and use the Service. You can find a list of authorized third-party software at http://messenger.msn.com/Help/Authorized.aspx.
And under section 13:
Unless you, or a third party on your behalf, have a separate written contract with Microsoft that modifies this contract, then we may terminate or suspend your Service at any time.
My interpretation of this is that if you use a third party client, Microsoft reserve the right to block you from connecting to the service, which I have never heard of happening.
sendMsg is a class which allows you to send a message to a contact from a specified account. It logs in, changes status to online, creates a new IM session with the target user, sends the message and ends both connections.
The Messenger server imposes a limit on how many IM sessions can be created per minute, so the script is not suited for sending messages to large numbers of contacts within the same login session (see below).
The user sending the message must be on the allow list of the receiving user; or, the target user must have “All others” on their allow list (as in the Windows Live Messenger options dialog). To get the login ticket for authentication it uses the MSNPAuth class, which is included in the ZIP file.
Because of the way the protocol works, the sending user doesn’t appear to come online because it does not synchronize lists.
This class has not been extensively tested, if you find a bug or error, please post a comment here.
Continue reading ’sendMsg: Sending messages using PHP’