News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Robert Basic's Blog:
Creating a chat bot with PHP and Dbus
January 09, 2012 @ 11:10:52

Robert Basic has continued his series looking at using Dbus in PHP with this latest post to his blog - using the foundation he's created before to make a chat bot that will listen and respond to commands on a Jabber network.

Now that we know how to use DBus to communicate with Pidgin from PHP and how to listen to DBus signals, it's time to put it all together by creating a simple chat bot! Nothing fancy, just a simple script that runs somewhere on some server and, by using a Pidgin account, can respond to some basic queries we send it.

His new code listens for an incoming message on the "PurpleInterface", grabs the name of the sender and calls a "PurpleConvImSend" method with the conversation object and the message to send. You can find the complete source for the project on his github account.

0 comments voice your opinion now!
dbus tutorial pigdin extension pecl chat bot jabber


Robert Basic's Blog:
Communicating with Pidgin from PHP via D-Bus
December 19, 2011 @ 09:10:23

Robert Basic has put together a new tutorial on his blog showing how he connected PHP and Pidgin (the popular chat client) with the help of the DBus extension.

Earlier this week I got an idea of trying to communicate with Pidgin, a chat client, via the terminal. [...] Surely I wasn't the first one to come up with this idea and after a bit of a googling found out that Pidgin's libpurple has a nice API for that, exposed via D-Bus. I first planned to write some scripts for this in Python or C, but when I finally sat down over the weekend to hack on this, realized there is a PHP D-Bus extension, thanks to Derick Rethans!

He goes through the whole process you'll need to get it up and working on your system - installing the extension via PECL, creating a DBus proxy to the Pigdin interface and getting a list of the currently connected users. You can find the first versions of this code in his account on github.

0 comments voice your opinion now!
dbus tutorial pigdin extension pecl



Community Events





Don't see your event here?
Let us know!


version community interview framework language podcast series opinion introduction voicesoftheelephpant symfony tool mvc update package release composer security library laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework