Icon Change

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Icon Change

    Code:
    <?php
    
    // create image
    $image = imagecreate(500, 350);
    
    // sky backgrounds for random selection
    $sky = array("terrain_sky_01.jpg","terrain_sky_02.jpg","terrain_sky_03.jpg");
    $random_sky = $sky[rand(0,count($sky)-1)]; // selects a random sky from available ones
    
    // terrain tiles for random selection
    $background = array("terrain_tile_01.jpg","terrain_tile_02.jpg","terrain_tile_03.jpg","terrain_tile_04.jpg");
    $random_background = $background[rand(0,count($background)-1)]; // selects a random tile from available ones
    
    // define image and colors
    $terrain = imagecreatefromjpeg("$random_sky");
    imageantialias($terrain,TRUE);
    $tile = imagecreatefromjpeg("$random_background");
    $bg  = imagecolorallocate($terrain, rand(150,255), rand(150,255),rand(150,255));
    $fill = imagesettile($terrain,$tile);
    
    // draw a polygon
    $points[0] = 0;
    $points[1] = 350;
    for ($x = 1; $x <= 27; $x++){
       $points[$x*2] = round(500/25*($x-1));
       $points[$x*2+1] = rand(200, 250);
    }
    $points[count($points)-1] = 350;
    $points[count($points)] = 500;
    for ($x=1;$x<=29;$x++){
       $bg_points[($x-1)*2] = $points[($x-1)*2];
       $bg_points[($x-1)*2+1] = $points[($x-1)*2+1]-3;
    }
    imagefilledpolygon($terrain, $bg_points, sizeof($points)/2, $bg);
    imagefilledpolygon($terrain, $points, sizeof($points)/2, IMG_COLOR_TILED);
    
    // flush image
    header(&#39;Content-type: image/png&#39;);
    imagepng($terrain);
    imagedestroy($terrain);
    
    ?>
    you end up with

    now refleash your screen lol
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    #2
    hmm...good coding...i like your coding style...:-)

    Comment


      #3
      /tease.gif" style="vertical-align:middle" emoid="" border="0" alt="tease.gif" />t;line-height:100%">Wirelessly posted (Nokia6630/1.0 (4.03.40) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1)

      My bf a good coder he the king lol

      Comment


        #4
        yea, he is very good! and helpful

        Comment


          #5
          lol thanks just out to enjoy it lol
          Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
          Visit: WapMasterz Coming Back Soon!
          _______
          SCRIPTS FOR SALE BY SUBZERO
          Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
          FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment

          Working...
          X