I can't guarantee you that this is going to work for your site but I hope this can be your solution even if it's just temporary
before
PHP Code:
imagestring ($image, 12, 0, $textheight, $str1, $color);
imagestring ($image, 12, 0, $textheight + 13, $str2, $color);
imagestring ($image, 12, 0, $textheight + 26, $str3, $color);
imagestring ($image, 12, 0, $textheight + 42, $str4, $color);
imagestring ($image, 12, 0, $textheight + 55, $str5, $color);
Add this line
PHP Code:
$x = ($newwidth - $newwidth/2)/2;
And then replace the zeros from
PHP Code:
imagestring ($image, 12, 0, $textheight, $str1, $color);
imagestring ($image, 12, 0, $textheight + 13, $str2, $color);
imagestring ($image, 12, 0, $textheight + 26, $str3, $color);
imagestring ($image, 12, 0, $textheight + 42, $str4, $color);
imagestring ($image, 12, 0, $textheight + 55, $str5, $color);
to $x
Final code should looks like this
PHP Code:
$x = ($newwidth - $newwidth/2)/2;
imagestring ($image, 12, $x, $textheight, $str1, $color);
imagestring ($image, 12, $x, $textheight + 13, $str2, $color);
imagestring ($image, 12, $x, $textheight + 26, $str3, $color);
imagestring ($image, 12, $x, $textheight + 42, $str4, $color);
imagestring ($image, 12, $x, $textheight + 55, $str5, $color);