Dynamik Sig

Code:
    <?php
        // image file - MUST BE PNG
        $imagefile = 'sig.png';

        // path from this file to the phpbb root folder
        $phpbb_root_path = './';

        // text colours
        $red   = 255;
        $green = 255;
        $blue  = 255;

        // text position
        $x = 110;
        $y = 35;

        // ------ no need to edit below ------ //
        define('IN_PHPBB', true);
        $phpEx = substr(strrchr(__FILE__, '.'), 1);
        include($phpbb_root_path . 'common.'.$phpEx);
        $image = imagecreatefrompng($imagefile);
        $colour = imagecolorallocate($image, $red, $green, $blue);
        imagestring($image, 2, $x, $y, 'Posts: ' . number_format($config['num_posts']) . ' | Topics: ' . number_format($config['num_topics']) . ' | Members: ' . number_format($config['num_users']), $colour);
        header('Content-Type: image/png');
        imagepng($image);
    ?>
 
There should be no space before the php opening tages
Code:
<?php
        // image file - MUST BE PNG
        $imagefile = 'sig.png';

        // path from this file to the phpbb root folder
        $phpbb_root_path = './';

        // text colours
        $red   = 255;
        $green = 255;
        $blue  = 255;

        // text position
        $x = 110;
        $y = 35;

        // ------ no need to edit below ------ //
        define('IN_PHPBB', true);
        $phpEx = substr(strrchr(__FILE__, '.'), 1);
        include($phpbb_root_path . 'common.'.$phpEx);
        $image = imagecreatefrompng($imagefile);
        $colour = imagecolorallocate($image, $red, $green, $blue);
        imagestring($image, 2, $x, $y, 'Posts: ' . number_format($config['num_posts']) . ' | Topics: ' . number_format($config['num_topics']) . ' | Members: ' . number_format($config['num_users']), $colour);
        header('Content-Type: image/png');
        imagepng($image);
?>
 
It works perfectly fine for me when i test it.

Make sure there is no space before the php opening tag. It should be at the start of line one.
 
Back
Top Bottom