
PHP
Get flash to fully experience Pearltrees
Creating a chat bot with PHP and Dbus ~ Robert Basic
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. What did we get? As we want our script to receive messages from an other account, first we need to listen to the ReceivedImMsg event on the im.pidgin.purple.PurpleInterface interface. The data we get with that event is the ID of receiver's account, the sender of the message, the actual message and the conversation's ID (and some flags which we're not interested in): $interface = "im.pidgin.purple.PurpleInterface"; $method = "ReceivedImMsg"; if ($signal->matches($interface, $method)) { $data = $signal->getData()->getData(); $receiver = $data[0]; $sender = $data[1]; $message = $data[2]; $conversation = $data[3]; }Update 2012/01/15: I finally got around to submitting a patch to document this feature in the PHP manual. Sebastian has merged it , so it will hopefully be available in the online manual soon. Update #2 2012/01/23: I got around to checking the online version of the manual and the current build includes my patch . Enjoy.
Matthew Turland » Blog Archive » Database Testing with PHPUnit and MySQL
A valider en masse vos inscriptions sur des forums, des annuaires , des plateformes de blogs, etc… sans passer par un logiciel ! Et vous pouvez utiliser ce script sur n’importe quel projet (mais n’oubliez pas de m’envoyer un petit chèque) privé ! N’oubliez pas de créer le fichier validation.logs.txt si vous désirez garder une trace des URLs validées ! Renseignez aussi les variables $regex, $threads et $timeout ainsi que $pop avec vos identifiants POP3 ou IMAP (mais il faudra faire quelques modifications, lisez la documentation sur les fonctions IMAP ) About the author
Récupération et validation des mails avec PHP chez Maxime DOKI-THONON
Dessiner la fractale de Mandelbrot
Savoir manipuler des données binaires en base 2 ou en base 16 (hexadécimal) peut s'avérer nécessaire ne serait-ce que pour la compréhension d'un algorithme. PHP propose pas mal de fonctionnalités à ce sujet, nous allons les passer en revue avec quelques exemples concrets. Commentez
Opérations booléennes et logique binaire en PHP
Codes en rapport avec CALENDRIER SIMPLE si cette page ne contient pas votre bonheur

