| Pages: 1 [2] 3 4 5 :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

wolfyman
|
Posted - 2006.01.12 10:39:00 -
[31]
Originally by: wolfyman Edited by: wolfyman on 12/01/2006 10:38:37
|

Sovereign533
|
Posted - 2006.01.18 03:05:00 -
[32]

|

LodeArm
|
Posted - 2006.02.04 17:41:00 -
[33]
just checking its deisplaying etc
|

Tommy TenKreds
|
Posted - 2006.02.04 19:32:00 -
[34]
Edited by: Tommy TenKreds on 04/02/2006 19:32:33
The script above did not work for me at all.
After much searching the Web, I found this one which works fine. Remember that you need to place this script ("rotate.php") within the SAME folder as your sigs and link to the script itself, using the IMG tags:-
e.g. http://www.mysite/sigs/rotate.php
Here's the script:-
<?php
if ($dir = opendir(".")) { $list = buildimagearray($dir); displayrandomimage($list); }
// This function reads all the files in the current directory and adds all image files to the array $list[] function buildimagearray($dir) { while (false !== ($file = readdir($dir))) { if (!is_dir($file) && getimagesize($file)) { $list[] = $file; } } return $list; }
// This function selects a random image, determines the mime type, opens the file for reading, // and then outputs the image function displayrandomimage($list) { srand ((double) microtime() * 10000000); $sig = array_rand ($list);
$size = getimagesize ($list[$sig]); $fp = fopen($list[$sig], "rb");
if ($size && $fp) { header("Content-type: {$size['mime']}"); fpassthru($fp); exit; } } ?> -----
On auction - Full Set of High-Grade SNAKE Implants
|

Candy
|
Posted - 2006.02.19 02:52:00 -
[35]
Yay it works! --------------------------
|

Jinx Barker
|
Posted - 2006.02.23 10:07:00 -
[36]
can some one explain the: "?random=499559" what does the number at the end represents and how ca\n I make siggy roatate more often?
|

Jinx Barker
|
Posted - 2006.02.23 18:00:00 -
[37]
Edited by: Jinx Barker on 23/02/2006 18:02:23 Ok, I figured out, big Thanks to Brother Benthor, how to make sure the images are random enough in each subsequent post, here is an example of how it should look:
http://website/folder/rotate.php?random=[*RND*]
The key is to have the "?random=[*RND*]" and not a number inside the brakets, also no spaces inside the brakets or anywhere, and remove the * symbols.
|

Linia
|
Posted - 2006.02.24 09:14:00 -
[38]
Originally by: Charleston Edited by: Charleston on 11/07/2005 07:32:09 For all those that want hosting space and cool random sig images - visit sig.aftermath.cx and sign up. It's very basic at the moment - but it works. Just sign up, upload your images - then set up your sig to include the image http://sig.aftermath.cx/<username>.jpg
Should support .jpg, .gif and .png images.
THX A LOT :D So cool service you got there!
|

Darknesss
|
Posted - 2006.02.26 15:42:00 -
[39]
hmmmm
|

Aleyna
|
Posted - 2006.02.26 15:48:00 -
[40]
hmmm¦
i am alpha and omega, the beginning and the end |

Beldaws
|
Posted - 2006.03.15 17:14:00 -
[41]
sounds interesting. i'll give it a try
|

Recluse Viramor
|
Posted - 2006.03.15 19:51:00 -
[42]
test
|

Recluse Viramor
|
Posted - 2006.03.15 19:54:00 -
[43]
test2
|

Gangus
|
Posted - 2006.04.04 12:20:00 -
[44]
test
|

Yo Fore
|
Posted - 2006.04.09 18:41:00 -
[45]
Edited by: Yo Fore on 09/04/2006 18:42:05
http://www.big-pricewatch.net/kb/?toon=Yo Fore&type=red |

Jo McLoli
|
Posted - 2006.04.14 07:25:00 -
[46]
Edited by: Jo McLoli on 14/04/2006 07:29:18 blatantly stolen from a guy called waha~ on the other side of the internet because php is ugly. bytes: 223 (vs original 1404) = 15.9% lines: 8 (vs original 68) = 11.8%
--file begins-- #!/usr/bin/perl
my $directory="src"; my @files=(glob("$directory/*.jpg"),glob("$directory/*.png"),glob("$directory/*.gif")); my $file=$files[rand @files]; print "Status: 302 Found\n"; print "Location: $file\n"; print "\n"; --file ends--
file is placed one dir above images dir "src" if $directory is used as above, use $directory "" if in the same dir, use "/absolute/path/from/webroot" or "relative/path/from/script" as needed |

Phuqumang
|
Posted - 2006.04.24 21:35:00 -
[47]
****
|

Eskalin
|
Posted - 2006.04.24 21:36:00 -
[48]
pop
|

PKlavins
|
Posted - 2006.04.26 20:43:00 -
[49]
Originally by: Charleston Edited by: Charleston on 11/07/2005 07:32:09 For all those that want hosting space and cool random sig images - visit sig.aftermath.cx and sign up. It's very basic at the moment - but it works. Just sign up, upload your images - then set up your sig to include the image http://sig.aftermath.cx/<username>.jpg
Should support .jpg, .gif and .png images.
it works...but it changes all my sigs at once...even the ones from previous posts...so all my sigs still are the same everywhere, just different everytime u load the page....how can u make it randomly decide only one sig at a time, and leave all the other ones alone?
I make sigs/banners 5mill each, convo/evemail for details |

Kael D'mende
|
Posted - 2006.06.04 23:04:00 -
[50]
Hrm.. nice find!
Check the full article here ;o)
http://www.alistapart.com/articles/randomizer/
/Kael Regards. /Kael |

Alessandra Grey
|
Posted - 2006.06.05 23:56:00 -
[51]
Edited by: Alessandra Grey on 05/06/2006 23:58:25
test _______________________
|

Crumplecorn
|
Posted - 2006.07.06 04:20:00 -
[52]
Originally by: Jo McLoli Edited by: Jo McLoli on 14/04/2006 07:29:18 blatantly stolen from a guy called waha~ on the other side of the internet because php is ugly.
PHP isn't ugly, it's just that perl is exceptionally beautiful. ----------
Throwing ships away doing stupid things since April '06 |

Sensor Error
0utbreak
|
Posted - 2006.07.19 09:22:00 -
[53]
Originally by: Ander Now to find all IP's of forum mods and exclude them from my php-siggy rotation script using IP-exclude... Mohwhaha...
*slabs on a 5mb siggy*
Oh dear, I'm glad i'm not the only one thinking that...
RABBLE RABBLE RABBLE!!!
------------------------------------------ Dev Responses to common questions |

Jo McLoli
|
Posted - 2006.07.24 01:41:00 -
[54]
Edited by: Jo McLoli on 24/07/2006 01:41:30
Originally by: Crumplecorn Edited by: Crumplecorn on 06/07/2006 05:34:05
Originally by: Jo McLoli Edited by: Jo McLoli on 14/04/2006 07:29:18 blatantly stolen from a guy called waha~ on the other side of the internet because php is ugly. bytes: 223 (vs original 1404) = 15.9% lines: 8 (vs original 68) = 11.8%
--file begins-- #!/usr/bin/perl
my $directory="src"; my @files=(glob("$directory/*.jpg"),glob("$directory/*.png"),glob("$directory/*.gif")); my $file=$files[rand @files]; print "Status: 302 Found\n"; print "Location: $file\n"; print "\n"; --file ends--
file is placed one dir above images dir "src" if $directory is used as above, use $directory "" if in the same dir, use "/absolute/path/from/webroot" or "relative/path/from/script" as needed
PHP isn't ugly, it's just perl is unusually beautiful.
Anyway:
--file begins-- <?php $dir="."; $files=array_merge(glob("$dir/*.jpg"), glob("$dir/*.gif"), glob("$dir/*.png")); header("Status: 302 Found"); header("Location: ".$files[rand(0,count($files)-1)]); ?> --file ends--
bytes: 210 (vs your 223) = 94% lines: 6 (vs your 8) = 75%%
golf!
--file begins-- #!/usr/bin/perl my $d="src"; my @f=(glob("$d/*.jpg"),glob("$d/*.png"),glob("$d/*.gif")); my $i=$f[rand @f]; print "Status: 302 Found\nLocation: $i\n\n"; --file ends--
bytes: 148 (vs 223) = 66% lines: 5 (vs 6) = 83%
|

Neolith
Caldari
|
Posted - 2006.08.02 03:59:00 -
[55]
hmm
|

Michta
|
Posted - 2006.08.06 12:09:00 -
[56]
----------------------- #!/usr/bin/perl my @f=<*.{jpg,png,gif}>; print "Status: 302 Found\nLocation: $f[rand @f]\n\n"; -----------------------
bytes: 95 (vs 148) = 69% lines: 3 (vs 5) = 60%
Keep images in same dir as the file.
Anyone up for the golfing-challenge?
|

Mike Vernon
|
Posted - 2006.08.06 12:13:00 -
[57]
-------------------- #!/usr/bin/perl print "Status: 302 Found\nLocation: $f[rand (@f=<*.{jpg,png,gif}>)]\n\n"; --------------------
bytes: 90 (vs 95) = 95% lines: 2 (vs 3) = 67%
|

Mike Vernon
|
Posted - 2006.08.06 12:22:00 -
[58]
-------------------- #!/usr/bin/perl print"Status:302 Found\nLocation:$f[rand(@f=<*.{jpg,png,gif}>)]\n\n"; --------------------
bytes: 86 (vs 90) = 96% lines: 2 (vs 2) = 100%
This is kinda anal tho, but works with my perl and my Firefox.
Dunno if Status:302 w/o that space is according to standard. The space between rand and ( I'm ok with getting rid of tho, the space between print and it's expression looks damn ugly, but it ok too.
|

Crumplecorn
Gallente Aerial Boundaries Inc. Interstellar Starbase Syndicate
|
Posted - 2006.08.08 13:50:00 -
[59]
Originally by: Jo McLoli stuff
While I could make my script a little smaller, PHP is simply never going to be able to do it in as few characters as perl I think. But PHP still isn't ugly. ----------
|

Makivelli
Gallente Eve University
|
Posted - 2006.09.01 02:45:00 -
[60]
test
|
| |
|
| Pages: 1 [2] 3 4 5 :: one page |
| First page | Previous page | Next page | Last page |