Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    May 2006
    Posts
    66
    Tokens
    0

    Default PHP Image Rotator

    Well this is a really simple script for a random signature. The same code as used in J0shIsBackLol's signature.

    PHP Code:
    <?php
    header
    ("Content-type: image/png");

    $images[] = "URL OF IMAGE";
    $images[] = "URL OF IMAGE";

    srand ((double) microtime() * 1000000);
    $randomimg rand(0,count($images)-1);

    $im imageCreateFromPng($images[$randomimg]);

    imagepng($im);
    imagedestroy($im);
    ?>

  2. #2
    Join Date
    Feb 2006
    Location
    Coventry
    Posts
    2,096
    Tokens
    0

    Latest Awards:

    Default

    And he didnt twll you that your signature needs tobe png for that code ^^^

  3. #3
    Join Date
    May 2006
    Posts
    66
    Tokens
    0

    Default

    Well, i coded it myself but who cares, png is the best.

  4. #4
    Join Date
    Aug 2005
    Location
    Location Location
    Posts
    1,730
    Tokens
    0

    Latest Awards:

    Default

    imageCreateFromPng
    I think that tells us it does


    I think this is adapted from dd if im right?

  5. #5
    Join Date
    May 2006
    Posts
    66
    Tokens
    0

    Default

    Wth is DD?

  6. #6
    Join Date
    Aug 2005
    Location
    Location Location
    Posts
    1,730
    Tokens
    0

    Latest Awards:

    Default

    Dynamic Drive

  7. #7
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    I had one ages ago, I also made a script which says the person's IP etc aswell. They're pretty simple.

    PHP Code:
    <?php 
    header
    ('content-type: image/gif'); 
    $images = array('image1.gif','image2.gif','image3.gif'); 
    include(
    $images[rand(0,sizeof($images)-1)]); 
    ?>
    Last edited by nets; 25-05-2006 at 08:20 PM. Reason: Just realised I made a stupid mistake.
    kinda quit.

  8. #8
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Yea, i made one ages ago, althogh since my last host didnt support GD, i used the include function to get the image data, simliar to nets

  9. #9
    Join Date
    Jul 2005
    Location
    -
    Posts
    2,995
    Tokens
    0

    Latest Awards:

    Default

    right 0.o how do i use in sig ?

  10. #10
    Join Date
    Aug 2005
    Location
    Location Location
    Posts
    1,730
    Tokens
    0

    Latest Awards:

    Default

    You dont.

    Sigs only support basic html like <b><i><u><div align="center>

    No php

Page 1 of 2 12 LastLast

Posting Permissions

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