What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Signature ...php

Signature ...php
Author: Message:
.blade//
Veteran Member
*****

Avatar

Posts: 2856
Reputation: 39
35 / Male / –
Joined: Jan 2004
RE: Signature ...php
Just go here, hit "View Source" and copy the script I found :P


Edit: Forgot :dodgy: Dodgy Php...



Here's the code, just put this on your site and stick the images in a subfolder called "img", that all! To add more just put stick more images in the 'img' directory.

code:
<?php
/*
Based on code by Perpetual Dreamer and Alland.

Instructions:

Place all the files that you want into the directory of your choice,
which will be specified in the $path variable.

Then, just link to the script as a php file. Can be used in a site, such as <img src="filename.php">,
or a forum, using [img ]http://yoursite.com/filename.php[/img]

Enjoy.


Rob
*/

//directory here (relative to script)
$path = 'img';

$i = 0;
$imgDir = opendir ($path);
    while ( $file = readdir( $imgDir ) )
    {   
        //checks that file is an image
        $file_type = strrchr( $file, "." );
        $is_image = eregi( "jpg|gif",$file_type );
       
        if ( $file != '.' && $file != '..' && $is_image )
        { $images[$i++] = $file; }
    }
closedir ($imgDir);

srand( (double) microtime()*1000000 );
$image_name = $path . '/' . $images[rand( 0,sizeof( $images ) -1 )];
$imgSize = GetImageSize( $image_name );

//ends script if no images found
if ( $i == 0 )
    die();

//Display the image
readfile("$image_name");

?>



This post was edited on 01-05-2005 at 10:56 PM by .blade//.
[Image: A%20Pointy%20Rock.jpg]
01-05-2005 10:53 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Signature ...php - by Purity on 01-05-2005 at 09:54 PM
RE: Signature ...php - by Tochjo on 01-05-2005 at 10:09 PM
RE: Signature ...php - by Purity on 01-05-2005 at 10:23 PM
RE: Signature ...php - by Chris.1 on 01-05-2005 at 10:45 PM
RE: Signature ...php - by lopardo on 01-05-2005 at 10:49 PM
RE: Signature ...php - by .blade// on 01-05-2005 at 10:53 PM
RE: Signature ...php - by lopardo on 01-05-2005 at 10:55 PM
RE: Signature ...php - by Purity on 01-06-2005 at 12:36 AM
RE: Signature ...php - by matty on 01-06-2005 at 12:40 AM
RE: Signature ...php - by Purity on 01-06-2005 at 12:41 AM
RE: Signature ...php - by matty on 01-06-2005 at 01:02 AM
RE: Signature ...php - by .blade// on 01-06-2005 at 01:05 AM
RE: Signature ...php - by matty on 01-06-2005 at 01:09 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On