When using imagepsbbox, you are probably trying to do something like creating a button with text, so that the button is large enough for the text...
Below is a very simple example of making a black button just big enough to display white text on it.
<?php
//if text is no variable set sample text
if (!$text)
$text = "This is a sample text";
// set the font size
$fontsize=14;
// load the font to use
$font=ImagePsLoadFont("/fonts/ariam___.pfb");
//get the left lower corner and the right upper
list($lx,$ly,$rx,$ry) = imagepsbbox($text,$font,$fontsize,0,0,0);
// calculate the size of the text
$textwidth = $rx - $lx;
$textheight = $ry - $ly;
// make an image 40 pixels wider and 20 pixels higher than the text
$imh = $textheight + 20;
$imw = $textwidth + 40;
$im = imageCreate( $imw, $imh );
//define colors, first color is used as background color!
$black = ImageColorAllocate ($im, 0, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);
//create the text (with the same parameters as imagepsbbox!)
ImagePSText ($im, "$text", $font, $fontsize, $white, $white, 20, 20,'','','',4);
//send the header
header("Content-type: image/jpeg");
// create the image
ImageJPEG ($im,"",100);
//destroy the image & font to free memory
Imagepsfreefont ( $font );
ImageDestroy ( $im );
?>