The bbcode extension is available as a set of built-in PHP functions if the extension is installed on your server. The PEAR functions would be available if your server has PEAR installed and either has that package installed or you install it yourself. Alternatively, you can download the PEAR code yourself and install the file(s) wherever you want, but you'll also have to do the same with any other PEAR packages which are required for this one to work. (It's a lot simpler if you have PEAR already installed. 🙂 )
Typically your web host will have some sort of info page telling you what PHP extensions and/or PEAR modules are installed. If not, you can find out by simply seeing what happens if you try to access them:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
// test bbcode:
?><p><?php
echo (function_exists('bbcode_create')) ? "bbcode installed" : "no bbcode :(";
?></p><?php
// test PEAR
$path = get_include_path();
if(preg_match('#pear#i', $path))
{
echo "<p>Looks like PEAR is installed.</p>";
require_once 'HTML/BBCodeParser.php'; // this will puke if not installed
echo "<p>Looks like BBCodeParser is installed.</p>";
}
else
{
echo "<p>Looks like no PEAR :(</p>";
}