|
|
|
|
![]() ![]() |
Jul 22 2005, 07:45 PM
Post
#1
|
|
|
Moderator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,325 Joined: 8-March 05 From: Mawson, Antarctica Member No.: 4,254 |
Today, I will show you how to make a sig rotator similar to mine (refresh a page with my post, and you will see a different sig each time). We will use the sig rotator to display random sigs here at trap17.
Code Explanation
Want Something Shorter? Go here: http://www.trap17.com/forums/index.php?sho...ndpost&p=189391 That's it! Post any questions below! This post has been edited by snlildude87: Sep 26 2005, 01:43 AM |
|
|
|
Jul 22 2005, 08:42 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 283 Joined: 10-October 04 Member No.: 1,637 |
cool.. rating 8/10. good for those sig makers, perhaps
|
|
|
|
Jul 23 2005, 12:27 AM
Post
#3
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,561 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() |
have an error
Parse error: parse error, unexpected T_ELSE in /home/saint/public_html/sig.png/index.php on line 20 |
|
|
|
Jul 23 2005, 12:31 AM
Post
#4
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,561 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() |
heres what i did but an error should up on line 20 "randum==2"
CODE <?php
Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); Header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); Header("Pragma: no-cache"); Header("Content-Type: image/gif"); srand((double)microtime()*1000000); $randnum = rand(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2 8); if($randnum == 0) { readfile("http://www.saint-michael.trap17.com/images/sig1-2.jpg"); } else if($randnum == 1) { readfile("http://www.saint-michael.trap17.com/images/sig1-3.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-4.jpg"); } else if($randnum == 2) { readfile("http://www.saint-michael.trap17.com/images/sig1-5.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-6.gif"); } else if($randnum == 3) { readfile("http://www.saint-michael.trap17.com/images/sig1-7.gif"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-8.jpg"); } else if($randnum == 4) { readfile("http://www.saint-michael.trap17.com/images/sig1-8.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-8-1.gif"); } else if($randnum == 5) { readfile("http://www.saint-michael.trap17.com/images/sig1-9.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-10.jpg"); } else if($randnum == 6) { readfile("http://www.saint-michael.trap17.com/images/sig1-11.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-11-1.gif"); } else if($randnum == 7) { readfile("http://www.saint-michael.trap17.com/images/sig1-12.png"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-12-1.gif"); } else if($randnum == 8) { readfile("http://www.saint-michael.trap17.com/images/sig1-13.png"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-14.png"); } else if($randnum == 9) { readfile("http://www.saint-michael.trap17.com/images/sig1-15.png"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-16.jpg"); } else if($randnum == 10) { readfile("http://www.saint-michael.trap17.com/images/sig1-17.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-18.jpg"); } else if($randnum == 11) { readfile("http://www.saint-michael.trap17.com/images/sig1-19.png"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-20.png"); } else if($randnum == 12) { readfile("http://www.saint-michael.trap17.com/images/sig1-21.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-22.jpg"); } else if($randnum == 13) { readfile("http://www.saint-michael.trap17.com/images/sig1-23.png"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-24.jpg"); } else if($randnum == 14) { readfile("http://www.saint-michael.trap17.com/images/sig1-25.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-26.jpg"); } else if($randnum == 15) { readfile("http://www.saint-michael.trap17.com/images/sig1-27.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-28.jpg"); } else if($randnum == 16) { readfile("http://www.saint-michael.trap17.com/images/sig1-29.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-30.jpg"); } else if($randnum == 17) { readfile("http://www.saint-michael.trap17.com/images/sig1-31.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-32.jpg"); } else if($randnum == 18) { readfile("http://www.saint-michael.trap17.com/images/sig1-34.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-35.png"); } else if($randnum == 19) { readfile("http://www.saint-michael.trap17.com/images/sig1-36.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-37.jpg"); } else if($randnum == 20) { readfile("http://www.saint-michael.trap17.com/images/sig1-38.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-39.jpg"); } else if($randnum == 21) { readfile("http://www.saint-michael.trap17.com/images/sig1-40.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-41.jpg"); } else if($randnum == 22) { readfile("http://www.saint-michael.trap17.com/images/sig1-42.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-43.jpg"); } else if($randnum == 23) { readfile("http://www.saint-michael.trap17.com/images/sig1-44.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-44-1.jpg"); } else if($randnum == 24) { readfile("http://www.saint-michael.trap17.com/images/sig1-45.png"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-45-1.png"); } else if($randnum == 25) { readfile("http://www.saint-michael.trap17.com/images/sig1-46.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-47.jpg"); } else if($randnum == 26) { readfile("http://www.saint-michael.trap17.com/images/sig1-48.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-49.jpg"); } else if($randnum == 27) { readfile("http://www.saint-michael.trap17.com/images/sig1-50.jpg"); } { readfile("http://www.saint-michael.trap17.com/images/sig1-51.jpg"); } else if($randnum == 28) { readfile("http://i14.photobucket.com/albums/a305/saint-michael/sig1-52.jpg"); } ?> |
|
|
|
Jul 23 2005, 01:54 AM
Post
#5
|
|
|
Moderator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,325 Joined: 8-March 05 From: Mawson, Antarctica Member No.: 4,254 |
Try this code instead:
CODE <?php Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); Header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); Header("Pragma: no-cache"); Header("Content-Type: image/gif"); srand((double)microtime()*1000000); $randnum = rand(0,54); if($randnum == 0) { readfile("http://www.saint-michael.trap17.com/images/sig1-2.jpg"); } else if($randnum == 1) { readfile("http://www.saint-michael.trap17.com/images/sig1-3.jpg"); } else if($randnum == 2) { readfile("http://www.saint-michael.trap17.com/images/sig1-4.jpg"); } else if($randnum == 3) { readfile("http://www.saint-michael.trap17.com/images/sig1-5.jpg"); } else if($randnum == 4) { readfile("http://www.saint-michael.trap17.com/images/sig1-6.gif"); } else if($randnum == 5) { readfile("http://www.saint-michael.trap17.com/images/sig1-7.gif"); } else if($randnum == 6) { readfile("http://www.saint-michael.trap17.com/images/sig1-8.jpg"); } else if($randnum == 7) { readfile("http://www.saint-michael.trap17.com/images/sig1-8.jpg"); } else if($randnum == 8) { readfile("http://www.saint-michael.trap17.com/images/sig1-8-1.gif"); } else if($randnum == 9) { readfile("http://www.saint-michael.trap17.com/images/sig1-9.jpg"); } else if($randnum == 10) { readfile("http://www.saint-michael.trap17.com/images/sig1-10.jpg"); } else if($randnum == 11) { readfile("http://www.saint-michael.trap17.com/images/sig1-11.jpg"); } else if($randnum == 12) { readfile("http://www.saint-michael.trap17.com/images/sig1-11-1.gif"); } else if($randnum == 13) { readfile("http://www.saint-michael.trap17.com/images/sig1-12.png"); } else if($randnum == 14) { readfile("http://www.saint-michael.trap17.com/images/sig1-12-1.gif"); } else if($randnum == 15) { readfile("http://www.saint-michael.trap17.com/images/sig1-13.png"); } else if($randnum == 16) { readfile("http://www.saint-michael.trap17.com/images/sig1-14.png"); } else if($randnum == 17) { readfile("http://www.saint-michael.trap17.com/images/sig1-15.png"); } else if($randnum == 18) { readfile("http://www.saint-michael.trap17.com/images/sig1-16.jpg"); } else if($randnum == 19) { readfile("http://www.saint-michael.trap17.com/images/sig1-17.jpg"); } else if($randnum == 20) { readfile("http://www.saint-michael.trap17.com/images/sig1-18.jpg"); } else if($randnum == 21) { readfile("http://www.saint-michael.trap17.com/images/sig1-19.png"); } else if($randnum == 22) { readfile("http://www.saint-michael.trap17.com/images/sig1-20.png"); } else if($randnum == 23) { readfile("http://www.saint-michael.trap17.com/images/sig1-21.jpg"); } else if($randnum == 24) { readfile("http://www.saint-michael.trap17.com/images/sig1-22.jpg"); } else if($randnum == 25) { readfile("http://www.saint-michael.trap17.com/images/sig1-23.png"); } else if($randnum == 26) { readfile("http://www.saint-michael.trap17.com/images/sig1-24.jpg"); } else if($randnum == 27) { readfile("http://www.saint-michael.trap17.com/images/sig1-25.jpg"); } else if($randnum == 28) { readfile("http://www.saint-michael.trap17.com/images/sig1-26.jpg"); } else if($randnum == 29) { readfile("http://www.saint-michael.trap17.com/images/sig1-27.jpg"); } else if($randnum == 30) { readfile("http://www.saint-michael.trap17.com/images/sig1-28.jpg"); } else if($randnum == 31) { readfile("http://www.saint-michael.trap17.com/images/sig1-29.jpg"); } else if($randnum == 32) { readfile("http://www.saint-michael.trap17.com/images/sig1-30.jpg"); } else if($randnum == 33) { readfile("http://www.saint-michael.trap17.com/images/sig1-31.jpg"); } else if($randnum == 34) { readfile("http://www.saint-michael.trap17.com/images/sig1-32.jpg"); } else if($randnum == 35) { readfile("http://www.saint-michael.trap17.com/images/sig1-34.jpg"); } else if($randnum == 36) { readfile("http://www.saint-michael.trap17.com/images/sig1-35.png"); } else if($randnum == 37) { readfile("http://www.saint-michael.trap17.com/images/sig1-36.jpg"); } else if($randnum == 38) { readfile("http://www.saint-michael.trap17.com/images/sig1-37.jpg"); } else if($randnum == 39) { readfile("http://www.saint-michael.trap17.com/images/sig1-38.jpg"); } else if($randnum == 40) { readfile("http://www.saint-michael.trap17.com/images/sig1-39.jpg"); } else if($randnum == 41) { readfile("http://www.saint-michael.trap17.com/images/sig1-40.jpg"); } else if($randnum == 42) { readfile("http://www.saint-michael.trap17.com/images/sig1-41.jpg"); } else if($randnum == 43) { readfile("http://www.saint-michael.trap17.com/images/sig1-42.jpg"); } else if($randnum == 44) { readfile("http://www.saint-michael.trap17.com/images/sig1-43.jpg"); } else if($randnum == 45) { readfile("http://www.saint-michael.trap17.com/images/sig1-44.jpg"); } else if($randnum == 46) { readfile("http://www.saint-michael.trap17.com/images/sig1-44-1.jpg"); } else if($randnum == 47) { readfile("http://www.saint-michael.trap17.com/images/sig1-45.png"); } else if($randnum == 48) { readfile("http://www.saint-michael.trap17.com/images/sig1-45-1.png"); } else if($randnum == 49) { readfile("http://www.saint-michael.trap17.com/images/sig1-46.jpg"); } else if($randnum == 50) { readfile("http://www.saint-michael.trap17.com/images/sig1-47.jpg"); } else if($randnum == 51) { readfile("http://www.saint-michael.trap17.com/images/sig1-48.jpg"); } else if($randnum == 52) { readfile("http://www.saint-michael.trap17.com/images/sig1-49.jpg"); } else if($randnum == 53) { readfile("http://www.saint-michael.trap17.com/images/sig1-50.jpg"); } else if($randnum == 54) { readfile("http://www.saint-michael.trap17.com/images/sig1-51.jpg"); } else if($randnum == 55) { readfile("http://i14.photobucket.com/albums/a305/saint-michael/sig1-52.jpg"); } ?> It might not work because I went through it in a second, but I'm 99% sure that it should. |
|
|
|
Jul 23 2005, 02:05 AM
Post
#6
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,561 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() |
yeah i had a funny feeling it was something like that but the else if statements threw me off a bit thanks again
|
|
|
|
Jul 23 2005, 02:46 AM
Post
#7
|
|