note 102740 added to image.examples-png

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
The current example fails unless the "button1.png" file is located.

I modified the example to account for this:

<?php

if (file_exists("images/button1.png")){

        header("Content-type: image/png");
        $string = $_GET['text'];
        $im     = imagecreatefrompng("images/button1.png");
        $orange = imagecolorallocate($im, 220, 210, 60);
        $px     = (imagesx($im) - 7.5 * strlen($string)) / 2;

        imagestring ($im, 3, $px, 9, $string, $orange);
        imagepng($im);
        imagedestroy($im);
} else {

        print ("File not fount, exiting...");
}

?>
----
Server IP: 69.147.83.197
Probable Submitter: 71.93.160.22
----
Manual Page -- http://www.php.net/manual/en/image.examples-png.php
Edit        -- https://master.php.net/note/edit/102740
Del: integrated  -- https://master.php.net/note/delete/102740/integrated
Del: useless     -- https://master.php.net/note/delete/102740/useless
Del: bad code    -- https://master.php.net/note/delete/102740/bad+code
Del: spam        -- https://master.php.net/note/delete/102740/spam
Del: non-english -- https://master.php.net/note/delete/102740/non-english
Del: in docs     -- https://master.php.net/note/delete/102740/in+docs
Del: other reasons-- https://master.php.net/note/delete/102740
Reject      -- https://master.php.net/note/reject/102740
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.