.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Programming (http://forums.bots-united.com/forumdisplay.php?f=25)
-   -   a different sig each time (http://forums.bots-united.com/showthread.php?t=146)

BAStumm 03-01-2004 01:20

Re: a different sig each time
 
glad i could return a favor, you've helped me many a time PM.

TruB 06-01-2004 12:11

Re: a different sig each time
 
does it have to be a png file.. can i change that. im not very good at php.. i getting help from someone who dont know much but know more then me..

Pierre-Marie Baty 06-01-2004 13:07

Re: a different sig each time
 
No, you can use one of the many image format PHP supports (provided PHP has been installed on your server with the right image lib extensions).

Have a look at www.php.net and search for the image capabilities of PHP. Everything is explained.

TruB 06-01-2004 19:54

Re: a different sig each time
 
k. thanks..

Fiber_Optic 10-01-2004 23:57

Re: a different sig each time
 
Quote:

Originally Posted by Pierre-Marie Baty
Have a look at www.php.net and search for the image capabilities of PHP. Everything is explained.

The documentation of php is the best I've ever seen (maybe because there is an official one... when a C++ official doc? msdn? pff... lol ) just after the java doc which is so huge... but so useful ! :D

FrostyCoolSlug 10-04-2004 05:15

Re: a different sig each time
 
Another (possibly slightly hackier, but still does the same) way to do this only with out the GD libs, would be something like this:

PHP Code:

<?php
$filename 
sprintf ("sig%d.png"rand (09));
readfile($filename);
?>

Rather than creating a new image, this would just 'dump' the contents of the image, keeping the image headers in tact.

The only main differences between this and the GD version are (like i said), this doesnt require GD, and it can be generated faster, thru not having to create a seperate image.

Pierre-Marie Baty 10-04-2004 14:58

Re: a different sig each time
 
testing...
wahey it works!!

Thanks Frosty! That's true, I prefer this method ! :)

FrostyCoolSlug 10-04-2004 16:33

Re: a different sig each time
 
glad i could help :)

FrostyCoolSlug 12-05-2004 07:00

Re: a different sig each time
 
i've got a slightly more 'interesting' method here, which will open a dir, read all the images in it, (doesnt matter about filenames, so long as they have valid extentions), then pick one of them at random, and display it if you want it. Would be easier for 'organising' sigs :p

TruB 12-05-2004 11:30

Re: a different sig each time
 
do you mind giving out the source?.. or something that is easy to change so it fits or another.. i would be pretty happy if you did..

its not very importent to me.. just a cool thing to have.. must add im complete noob when it comes to php coding..


All times are GMT +2. The time now is 22:09.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.