Creating a dynamic signature
Creating a dynamic signature
funny stuff
Archived topic from Iceteks, old topic ID:1293, old post ID:11946
Archived topic from Iceteks, old topic ID:1293, old post ID:11946
-
- Posts: 5140
- Joined: Fri Jan 10, 2003 1:14 am
Creating a dynamic signature
http://www.google.com/search?q=sig_randomi...=utf-8&oe=utf-8
Perhaps?
EDIT: Click on the only link there. For some reason, I can't post the URL! I paste it into here, but it changes to what Wldkos has when I post!
Archived topic from Iceteks, old topic ID:1293, old post ID:12015
Creating a dynamic signature
let me try
http://www.puttrich.net/rtsupport/sig_randomizer/
Archived topic from Iceteks, old topic ID:1293, old post ID:12019
http://www.puttrich.net/rtsupport/sig_randomizer/
Archived topic from Iceteks, old topic ID:1293, old post ID:12019
Creating a dynamic signature
Hey red, how about some help with this one? I see your sig change all the time using opera...
I have my .htaccess file in my /sig directory with about 15 banners...
Archived topic from Iceteks, old topic ID:1293, old post ID:12020
I have my .htaccess file in my /sig directory with about 15 banners...
Then I have a "number.txt file with just a "0" in it, that's all. What's going on here?
ForceType application/x-httpd-php
<?php
//decide what image number we will display
$numberfile = fopen("number.txt","r");
$number=fgets($numberfile,10);
fclose($numberfile);
$number = $number+3; //adding 5 makes it a bit more random
if($number>9)$number=$number-9;
$numberfile = fopen("number.txt","w");
fputs($numberfile,$number."
"); //rewrite the new number to file
fclose($numberfile);
//display the right image depending on what the number is:
if($number==1)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...2_a.jpg");
if($number==2)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...s_b.jpg");
if($number==3)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...k_c.png");
if($number==4)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...m_d.jpg");
if($number==5)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...s_e.jpg");
if($number==6)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...r_f.jpg");
if($number==7)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...s_g.jpg");
if($number==8)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...r_h.gif");
if($number==9)header("Location: http://worldchaos.no-ip.com:12123/wldkos/s...s_i.png");
?>
Archived topic from Iceteks, old topic ID:1293, old post ID:12020
Creating a dynamic signature
for some reason, the script is using the images with linnks and putting a "/sunkos_i.png%22);" after it.... so it can't find the image since there is no image with a %22 after it (%22 I assume is ";")
Archived topic from Iceteks, old topic ID:1293, old post ID:12021
Archived topic from Iceteks, old topic ID:1293, old post ID:12021
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
Hmm should work, but did you download the number.txt to see if it changed? I know it took my a while on mozilla to see if it worked since it kept caching it even though I told it not to. Opera does not work very well with these sig changers either, especially different sizes.
But that code should work, I think it's just a cache problem.
But check the article again since this part does not work half like I figured it would so I changed it:
$number = $number+3; //adding 5 makes it a bit more random
if($number>9)$number=$number-9;
It just adds the number instead.
Archived topic from Iceteks, old topic ID:1293, old post ID:12022
But that code should work, I think it's just a cache problem.
But check the article again since this part does not work half like I figured it would so I changed it:
$number = $number+3; //adding 5 makes it a bit more random
if($number>9)$number=$number-9;
It just adds the number instead.
Archived topic from Iceteks, old topic ID:1293, old post ID:12022
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
I honestly think it's the syntax in the linking since when you click on the image links in my htaccess it gives you and error cuz it's including "');" in the url. I do not know enough php to fix that though.
Archived topic from Iceteks, old topic ID:1293, old post ID:12034
Archived topic from Iceteks, old topic ID:1293, old post ID:12034
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
That's just the forum doing that, it's because it just takes everything after http:// so if there's no space it still takes it, it would have tocheck if the url goes somewhere or not and doing that char by char would be very taxing, and most of the time we put at least one space after typing a url anyway.wldkos wrote: I honestly think it's the syntax in the linking since when you click on the image links in my htaccess it gives you and error cuz it's including "');" in the url. I do not know enough php to fix that though.
Archived topic from Iceteks, old topic ID:1293, old post ID:12039
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
So are you going to give us the updated script and directions then?
Archived topic from Iceteks, old topic ID:1293, old post ID:12046
Archived topic from Iceteks, old topic ID:1293, old post ID:12046
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
It's already there.wldkos wrote: So are you going to give us the updated script and directions then?
http://www.iceteks.com/articles.php?act=vi...icle=dynsig&p=1
Archived topic from Iceteks, old topic ID:1293, old post ID:12047
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
blah, thanks for telling me now!
Archived topic from Iceteks, old topic ID:1293, old post ID:12054
Archived topic from Iceteks, old topic ID:1293, old post ID:12054
Creating a dynamic signature
wait... so now I am supposed to make a php file with the code in there but rename it to jpg? What if I have gifs and png's in there as well?
Archived topic from Iceteks, old topic ID:1293, old post ID:12055
Archived topic from Iceteks, old topic ID:1293, old post ID:12055
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
Yes, the folder has to be dedicated for the "Fake" image. Don't put real images in there as they will try to run as php.wldkos wrote: wait... so now I am supposed to make a php file with the code in there but rename it to jpg? What if I have gifs and png's in there as well?
Archived topic from Iceteks, old topic ID:1293, old post ID:12056
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
so right now... I have an .htaccess file with the code linking to the images in there. Then in the same directory I have all the images and the number.txt file with "0" in it. Where do I fix this?Red Squirrel wrote:Yes, the folder has to be dedicated for the "Fake" image. Don't put real images in there as they will try to run as php.wldkos wrote: wait... so now I am supposed to make a php file with the code in there but rename it to jpg? What if I have gifs and png's in there as well?
Archived topic from Iceteks, old topic ID:1293, old post ID:12057
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
You should have a seperate "normal" folder with real images, then somewhere else a folder that has a .htaccess to turn jpg into php, and then you put the fake jpg file and number.txt, and the jpg file should link to the images in the "normal" folder with the real images.wldkos wrote:so right now... I have an .htaccess file with the code linking to the images in there. Then in the same directory I have all the images and the number.txt file with "0" in it. Where do I fix this?Red Squirrel wrote:Yes, the folder has to be dedicated for the "Fake" image. Don't put real images in there as they will try to run as php.wldkos wrote: wait... so now I am supposed to make a php file with the code in there but rename it to jpg? What if I have gifs and png's in there as well?
Archived topic from Iceteks, old topic ID:1293, old post ID:12060
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
can't have them all in the same folder? Cuz I am not putting the full url, just relative since the script is with the images.
Archived topic from Iceteks, old topic ID:1293, old post ID:12062
Archived topic from Iceteks, old topic ID:1293, old post ID:12062
Creating a dynamic signature
changed that.. Put in the full url and as youc an tell by my sig, nothing is working
Archived topic from Iceteks, old topic ID:1293, old post ID:12063
Archived topic from Iceteks, old topic ID:1293, old post ID:12063
Creating a dynamic signature
ok layout:
public_html/sig/ < this is where the files are...
my images (real ones) are in the /sig directory.
I have an .htaccess file in the /sig directory that says this and only this:
then I have "sig.jpg" which is the php code renamed to jpg
public_html/sig/ < this is where the files are...
my images (real ones) are in the /sig directory.
I have an .htaccess file in the /sig directory that says this and only this:
then I have "number.txt" with only a single "0" (zero) in it.ForceType application/x-httpd-php
then I have "sig.jpg" which is the php code renamed to jpg
Code: Select all
<?php
$images = 9; //number of images
//---- file management stuff ----
$numberfile = fopen("number.txt","r");
$number=fgets($numberfile,10);
fclose($numberfile);
$number=$number+1;
if($number>$images)$number=0;
$numberfile = fopen("number.txt","w");
fputs($numberfile,$number."n");
fclose($numberfile);
header("Cache-Control: no-cache, must-revalidate, no-store"); //force browsers to not cache it //display the right image depending on what the number is:
if($number==1)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/bg52_a.jpg");
if($number==2)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/chekaos_b.jpg");
if($number==3)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/evilwk_c.png");
if($number==4)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/freedom_d.jpg");
if($number==5)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/fries_e.jpg");
if($number==6)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/glassbanner_f.jpg");
if($number==7)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/spiralchaos_g.jpg");
if($number==8)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/star_h.gif.");
if($number==9)header("Location: http://worldchaos.no-ip.com:12123/wldkos/sig/sunkos_i.png.");
?>
[code] :pissed off:
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:1293, old post ID:12064[/size][/color]
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
You are still doing it wrong. The /sig directory with the images should NOT have the .htaccess file. Do a /sig/random/ directory and put the .htaccess in there along with the fake jpg and the number.txt and it should work.
Archived topic from Iceteks, old topic ID:1293, old post ID:12065
Archived topic from Iceteks, old topic ID:1293, old post ID:12065
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
Ok I now have /sig with the banners in it and then /sig/random with .htaccess, number.txt and sig.jpp (php code)...
not working.
Archived topic from Iceteks, old topic ID:1293, old post ID:12074
not working.
Archived topic from Iceteks, old topic ID:1293, old post ID:12074
Creating a dynamic signature
quite wierd, but almost there... if you go here http://worldchaos.no-ip.com:12123/wldkos/sig/random/sig.jpg you can see that it's trying to dislpay an image, well atleast in opera, I see the text "image". The complete url is correct to the banners... what if i just put ../../banner.jpg? since it's /sig/random/sig.jpg
Archived topic from Iceteks, old topic ID:1293, old post ID:12075
Archived topic from Iceteks, old topic ID:1293, old post ID:12075
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
I get
http://worldchaos.no-ip.com:12123/wldkos/sig/random/sig.jpg
The script probably has a parse error or something, look for a missing semi colon and what not.
Archived topic from Iceteks, old topic ID:1293, old post ID:12076
http://worldchaos.no-ip.com:12123/wldkos/sig/random/sig.jpg
The script probably has a parse error or something, look for a missing semi colon and what not.
Archived topic from Iceteks, old topic ID:1293, old post ID:12076
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
I really do not know what's up with this. If someone else got this to work with red's script. I'd like to know how.
Archived topic from Iceteks, old topic ID:1293, old post ID:12083
Archived topic from Iceteks, old topic ID:1293, old post ID:12083
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
Creating a dynamic signature
Can't see why it's not working though. I think it's some kind of miss configuration, like did you chmod to 777? (the folder) it has to be able to read the file and write to it.
Archived topic from Iceteks, old topic ID:1293, old post ID:12085
Archived topic from Iceteks, old topic ID:1293, old post ID:12085
Honk if you love Jesus, text if you want to meet Him!
Creating a dynamic signature
all the folders necessary are 777 as of now, and it's still not working. when I use the image though I do this right? <img>http://worldchaos.no-ip.com:12123/wldko ... g.jpg</img>
substitute [] for <>
Archived topic from Iceteks, old topic ID:1293, old post ID:12091
substitute [] for <>
Archived topic from Iceteks, old topic ID:1293, old post ID:12091