View Poll Results: Did this script help you?

Voters
0. You may not vote on this poll
  • Yes

    0 0%
  • No

    0 0%
Results 1 to 10 of 10

Thread: Picture making script

  1. #1
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default Picture making script

    A script that turns text into a picture! PHP 4 compatible. Many capabilities; hide e-mail from harvesters, make buttons, ect. check it out here.
    Here is the first html page code:
    HTML Code:
    <html>
    <head><title>Create a Picture</title>
    </head>
    <body>
    <form method="get" action="createimagewtext.php">
    Text In Picture:<input type="text" name="text"><br>
    Backround color:
    <select name="bg">
    <option value="000,000,000">Black</option>
    <option value="255,000,000">Red</option>
    <option value="000,255,000">Green</option>
    <option value="000,000,255">Blue</option>
    <option value="255,255,000">Yellow</option>
    <option value="000,000,255">Aqua</option>
    <option value="255,000,255">Fuchsia</option>
    <option value="192,192,192">Grey</option>
    <option value="255,255,255" selected="selected">White</option>
    </select>
    Text Color:
    <select name="te">
    <option value="000,000,000" selected="selected">Black</option>
    <option value="255,000,000">Red</option>
    <option value="000,255,000">Green</option>
    <option value="000,000,255">Blue</option>
    <option value="255,255,000">Yellow</option>
    <option value="000,255,255">Aqua</option>
    <option value="255,000,255">Fuchsia</option>
    <option value="192,192,192">Grey</option>
    <option value="255,255,255">White</option>
    </select><br>
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>
    and here is the php code:
    PHP Code:
    <?php
    header
    ("Content-type: image/png"); // Tell  the browser it's an image, 
    $text $_REQUEST["text"] ;
    $bg $_REQUEST["bg"] ;
    $te $_REQUEST["te"] ;

    $bdc explode(",",$bg);
    $tec explode(",",$te);

    $number strlen($text);  // Count the chars in the text.
     
    $number = ($number*7)+9// Times this by 7 and add 9 to make it look the right size.
     
    $im imagecreate($number24); // Create the basic size, $number x 24
     
    $colour1 imagecolorallocate($im$bdc[0], $bdc[1], $bdc[2]); // Background Color

    $colour2 imagecolorallocate($im$tec[0], $tec[1], $tec[2]); // Text Color
     
    imagestring($im355,  $text$colour2); // Add the text to the image.

    imagepng($im); // Create and display the image.

    imagedestroy($im); // Cast the image from the server (will cause lag eventually if you don't).

    ?>
    Last edited by Master_script_maker; 11-22-2007 at 01:37 PM.
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Not working.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    what's not working. the site or the code?
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Either.. both? The site is up, the code is there, when you type in text, pick your colors and hit submit, you get a string of letters and what appears to be wingdings.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    A script that turns text into a picture! PHP 4 compatible
    support for PHP 4 will be ending shortly on php.net that is.

    Quote Originally Posted by php.net 7.13.07
    Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued.

    The PHP development team hereby announces that support for PHP 4 will continue until the end of this year only. After 2007-12-31 there will be no more releases of PHP 4.4. We will continue to make critical security fixes available on a case-by-case basis until 2008-08-08. Please use the rest of this year to make your application suitable to run on PHP 5.

  6. #6
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by boogyman View Post
    support for PHP 4 will be ending shortly on php.net that is.
    works in PHP 5 too
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  7. #7
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Errr.. no it doesn't... Here is a screen of the output... that is anything but a picture...
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #8
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by BLiZZaRD View Post
    Errr.. no it doesn't... Here is a screen of the output... that is anything but a picture...
    I fixed it now
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  9. #9
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    That's better. Did you adjust your code in the first post?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  10. #10
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    yes i added
    PHP Code:
    header("Content-type: image/png"); // Tell  the browser it's an image 
    i forgot it. a stupid mistake
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •