Results 1 to 3 of 3

Thread: Random Text PHP

  1. #1
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts

    Random Text PHP

    Hey
    I hope you like it!
    Code:
    <?php 
    
    $text_random[1]='CHANGE ME'; 
    $text_random[2]='CHANGE ME'; 
    $text_random[3]='CHANGE ME';
    $text_random[4]='CHANGE ME';
    $text_random[5]='CHANGE ME';
    $text_random[6]='CHANGE ME';
    
    $random_text = rand(1,6);
    
    $im = imagecreatefrompng("YOUR_PICTURE_FOR_THE_SCRIPT");
    $white = imagecolorallocate($im, 255, 255, 255);
    
    imagestring($im, 3, 300, 20, $text_random[$random_text], $white);
    header("Content-type: image/png");
    imagegif($im);
    imagedestroy($im);
    ?>
    Last edited by STAUFFi; 7th June 2013 at 11:42.

  2. The Following User Says Thank You to STAUFFi For This Useful Post:

    kung foo man (7th June 2013)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    How it will look like?
    timescale 0.01

  4. #3
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts

Posting Permissions

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