Random sigs

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

igNiTion

here
Apr 9, 2004
2,456
0
36
South Carolina
zynthetic said:
I'd give this a try myself. Perhaps a bit redundant, but unlike several scripts I've used in the past this has support for all common image types?
supports jpg, gif, and png only.

Ok, I still can't get the links to work. Making the tables got the random-ness to work, but sometimes when I go to index.php rather than displaying an image it pops open a download box for "thumbs.db" which is not good. edit - i accidentally uploaded thumbs.db...deleted it. should't do that anymore :)

I'm still confused about the links though.

As for the links - is all I have to do type in the name and link in those 2 fields? Because I tried that...and it didn't work :(

 
Last edited:

igNiTion

here
Apr 9, 2004
2,456
0
36
South Carolina
Ok, seems to be working now, except for a couple things.

1) the sigs don't change when you refresh the page or whatever and 2) the links are often off, which may be due to the fact that the sig isn't changing when the page is refreshed :p
 

leafo

spoiled toothpaste
Mar 29, 2005
64
0
0
Youre making this way to complicated, you need 2 lines of code on a php enabled server to do this:
Code:
<?php
$num=rand(1,5);
header('Location: http://www.location.com/of/images/'.$num.'.gif');
?>
Just change the location part to where the images are located. The above example was if you had 5 images, you could change the 5 to whatever max you use. You can also change the .gif to whatever type of images you are using. Then just place all the images in the folder specified with numerical names, like 1.gif, 2.gif, etc. Save it as a .php file from notepad and upload.
 

dirtmcgirt

dirtmcgirt
Apr 5, 2005
290
0
0
Durham
can somone tell me of a program other than photo bucket that i can make sigs with?? it has to be free also plz. thats all =]
 

Kantham

Fool.
Sep 17, 2004
18,034
2
38
Fr4g D3mon said:
can somone tell me of a program other than photo bucket that i can make sigs with?? it has to be free also plz. thats all =]


Also , this had nothing to do with Random sigs , please stop asking your question on every forums and thread like that talk about the word ''sig''
 

Kantham

Fool.
Sep 17, 2004
18,034
2
38
I use it for a good while now. I Was wondering somthing. Sometimes the sig don't show up, and sometimes it do.
Anyone else got this?
 

Trentdaddy

Interface with me by entering my face.
Jul 12, 2002
214
0
0
Alabama
I am thinking that this is working correctly for me. I linked to the .php in my sig and I am getting an image. So far, I haven't seen a different one. I believe there is a certain time setting that changes that right? I found a very simple php line that got it to work. Here (first post) : http://beta.twelvestone.com/forum_thread/view/10203

This is it:
Code:
<?php



header("Content-Type: image/jpeg");

$sigs = array();

// reference your sig images here

$sigs[] = "http://url.com/sig1.jpg";

$sigs[] = "http://url.com/sig2.jpg";

$sigs[] = "http://url.com/sig3.jpg";

mt_srand((double)microtime()*1000000);

$sig = $sigs[mt_rand(0, count($sigs)-1)];

$im = ImageCreatefromjpeg("$sig");

Imagejpeg ($im);



?>

I assume that the numeric value next to microtime (and the fact that it is microtime and not some other unit or something) affects the time. What i don't know is how long *1000000 in microtime is and what to change it to if I would want to change it.

EDIT: It doesn't seem to be changing... maybe i need to wait some more.

EDIT 2: Dang it. I didn't actually change it. I had some personal error. Now it is linked to the php, but it just shows a blank. *sigh* working on it.

Edit 3: Tried a different one and I though I worked it right (it is in the sig right now), but I'm still getting a blank. I don't want this badly, but I thought this would be relatively easy.
 
Last edited:

S3NTYN3L

New Member
Sep 13, 2005
1
0
0
I'm looking for some help with phpMyAdmin.

I want to create a random sig but I've got NO IDEA how to use this phpMyAdmin thing.

Can someone PLEASE help me out?
 
Last edited:

MÆST

Active Member
Jan 28, 2001
2,898
13
38
39
WA, USA
Got a quick question, forgot exactly whose random script I am using (I've tried a bunch of them), here's what the code looks like if you can recognize it:

Code:
<?php
unset($max, $dir, $handle, $file, $current, $rand);
$max = 0;
$dir = getcwd();
if ($handle = opendir("$dir")) {
while (false !== ($file = readdir($handle))) { 
if ($file != "." && $file != ".." && $file != "$PHP_SELF") { 
$max = $max + 1; } }
closedir($handle); }
$rand = rand("1", "$max");
$current = 0;
if ($handle = opendir("$dir")) {
while (false !== ($file = readdir($handle))) { 
if ($file != "." && $file != ".." && $file != "$PHP_SELF") { 
$current = $current + 1;
if($current==$rand) { @readfile("$file"); } } }
closedir($handle); 
}
?>

Anyway, my question is if anyone knows how it could be edited so that it could randomly display an image created by another php script in with the rotation. Specifically, I'd like this sig to randomly show up in addition to the usual jpgs and pngs that are in my sigs/random directory.