![]() |
Re: a different sig each time
oh yeah, I'm interested as well :)
that's teh way I'm learning PHP: by reading at other ppl's code... |
Re: a different sig each time
once i was using crontab :D
then i used php genrated image then the .php links were forbidden because it could return dangerouns output so i changed it to writ the .jpg file a diff file (well more like crontab script in fact) now i use static jpg cause i got used to it - easier to find my own posts |
Re: a different sig each time
ok, here we go then :)
This script is much longer than the others, but does what its told :) PHP Code:
If you have any questions, gimme a shout :) |
Re: a different sig each time
hehe w00t thanks
I've made it a lil bit shorter :) don't forget to close the directory handle in your code btw... Code:
<?php |
Re: a different sig each time
how in the world could a simple Joe like me get this one going? i like that kind of stuff!
|
Re: a different sig each time
Well, just copy what's inside the code tags and paste it in your notepad, then save the file and name it "sig.php" or whatever. Then upload it to your server in the directory where you put your signatures, and instead of using [ img]http://soulfathermaps.de/images/mysig.jpg[ /img] use [ img]http://soulfathermaps.de/images/sig.php[ /img]
That should be enough Ensure the directory where your sig is has read access allowed to anybody. |
Re: a different sig each time
sounds real easy :)
and how do i make it select 4 pics designed just for this purpose? and not the whole bank of pics? |
Re: a different sig each time
to my understanding (php is one of my things in the the things to learn list :()
if u upload the 4 photo's\images and the sig in the same folder to the server and link upto that sig.php script it will automatically choose from that 4 becoz there is no other in that folder |
Re: a different sig each time
Quote:
Quote:
Mine was designed to be more customisable, rather than 'just work', so you could select the folder easily, and simple add , "ext" to add an extention to the list.. What i've done here, is taken the speed of yours, and the customisability of mine, and combined them, and got the following :p PHP Code:
|
Re: a different sig each time
@Frosty: About the "rand (0, $file_count - 1)", I suppose the array indexing works just like in C ?
Let's say we have an array of 3 elements (hence $file_count = 3) we have array[0] -> first element array[1] -> second element array[2] -> third element (and no array[3], which is out of bounds) is that right ? so if I want to pick a random number between 0 and 2 inclusively, I call rand (0, $file_list - 1)... well that's how I see things, but you know PHP better than me so... ???:( @SF: with this script you have to arrange your pics into subdirectories, because it takes the whole image list. If you want a script that would output only a selected set of images randomly, you can write something like this: Code:
<?php |
All times are GMT +2. The time now is 22:08. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.