I think i understand what you're trying to do, not sure if it will work with photobucket hosted images, but give this a try.
$code[1] = "http://i78.photobucket.com/albums/j107/djmashedman/Sigs/dantepraiseofwarsig001copy.png";
$code[2] = "http://i78.photobucket.com/albums/j107/djmashedman/Sigs/ibetyoudieyounggrungesig001copy.png";
$code[3] = "http://i78.photobucket.com/albums/j107/djmashedman/Sigs/photobucketspoofsig001.png";
$code[4] = "http://i78.photobucket.com/albums/j107/djmashedman/Sigs/samusaransig001copy.png";
$code[5] = "http://i78.photobucket.com/albums/j107/djmashedman/Sigs/cb520bbe.png";
$code[6] = "http://i78.photobucket.com/albums/j107/djmashedman/Sigs/samuspixelblursig002.png";
$code[7] = "http://i6.photobucket.com/albums/y223/Prima400/CantiNewSlang.jpg";
$code[8] = "Your Image URL}";
$code[9] = "{Your Image URL}";
$code[10] = "{Your Image URL}";
$key = array_rand($code,1); // this way is much more error proof
$img = $code[$key];
$img_ext = substr($img,strrpos($img,'.') + 1); // getimagesize() would be better, but this should work
if($img_ext == 'jpg')
{
$img_ext = 'jpeg'; // for the header
}
header("Content-Type: image/$img_ext");
include($img);
Put that code in a .php file, say image.php, and put the php url inside the bbcode img tag.
[img=http://www.yoursite.com/image.php]