Skip to main content

Posts

Showing posts from October, 2011

[Programming] XMPP and Office Guru (Part 2)

Since my last post, I had a really hard time making XMPP work using XMPP severs for Linux. Luckily, there was an easier way of doing things without the messy details of installing and hosting your own XMPP server. From this post, How to Write Your Own IM Bot in Less Than 5 Minutes (http://www.labnol.org/internet/tutorial-create-bot-for-gtalk-yahoo-messenger/4354/) I found out that there is a service called IMified which 'hosts' your bots and calls a specific page to do all the processing. As an overview, below is a simple diagram on how IMified works. So going back to our previous problem, how do we create a location monitoring application which accepts user input thru IM and then displays it to a screen? So with my IMified bot in place, what I did was to code a simple PHP page which accepts POST parameters from IMified and processes it accordingly. Below is the source code for the page which accepts the values sent from IMified <?PHP /* IMified Message Handler Allan...

Posting Source Codes

I have a draft post to the part 2 of my previous post about creating a chatbot, it seems like it has been stuck in draft for quite some time since I was looking for a solution on how to post source code here in Blogger. After trying out some stuff and having failed attempts, I went out for a while and shelved the whole thing. <? PHP echo ("Hello World!"); ?> Credit goes out to  http://eli.thegreenplace.net/2006/03/20/posting-source-code-to-blogger/  which apparently, I've failed to see previously. After trying it out, I've seen a  more proper and elegant solution. By enabling the "Show HTML literally" and adding a <pre> </pre> tag on the HTML source of the post one could obtain the formatting above. Hopefully I could finalize my previous post about setting up a chatbot.