phIRCe is an IRC bot written in PHP that can control a channel, perform searches 
on Google, fetch the titles from many URLs and archive their content. Runs only
on the Freenode network.

    - PHP 5.3+
        - sockets extension
        - Curl extension for extracting title of web pages, and archiving them
        - JSON extension for parsing results of !google command
        - DOM/libxml extensions for extracting text of twitter.com and identi.ca URLs

    - Download a copy of the bot
    - Extract the files somewhere on your filesystem
    - Edit config.php to fit your needs
    - Start the bot with php -q ~/path/to/phirce/bot.php
    - Have fun

Website: http://bitbucket.org/trmanco/phirce/

Get the source: http://bitbucket.org/trmanco/phirce/src/
(Mercurial repository)

Feel free to contribute in any way you can, some L10n would be great.

Installing Prerequisites

Centos 5.5 (may also work for other releases, including Fedora and RHEL)
The default php includes curl and libxml.

1) Install json support:

   Check if the pecl utility exists, with # which pecl
   If not,
     # yum install pear-php pear-devel
   Check if gcc exists, with # which gcc
   If not,
     # yum install gcc
     # pecl install json
   Make sure a file /etc/php.d/json.ini exists, with the content:
     extension = json.so

   Test with: # php -r 'json_decode("");'
   (if no error is printed, json support is installed.)

2) Install DOM support:
     # yum install php-xml

   Test with: # php -r 'DOMDocument::loadHTML("x");'
   (if no error is printed, DOM support is installed.)


Failure to authenticate with Twitter:

If your credentials are correct, but you see

  Authenticating with Twitter... 0; SSL certificate problem, verify that the CA cert is OK. Details:
  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

then your curl CA bundle may be out of date.

It can be updated by downloading and extracting the latest curl sources
(I used curl-7.33.0), and running this command in the source directory:

  $ lib/mk-ca-bundle.pl

Then replace the installed bundle with the generated file ca-bundle.crt
(you will need root permissions to do this).

The path to the CA bundle should be given in the verbose output of curl;
on my system it is /usr/share/curl/curl-ca-bundle.crt.