Saint_Michael
Jul 25 2005, 09:57 PM
| | oooh i get it know duh i was looking at it like a moron, going to try it out right now.
just tried it but it did not work and i know why i have png and gif files in here as well so how would i could the format .jpg/.gif/.png in tho the coding?
and it didn't pick up any of my jpg files either when i did it. |
Reply
sachavdk
Jul 26 2005, 12:34 AM
1st: Your png/gif problem could be solved using file_exists and check the extensions you use IE: CODE $file = "http://www.saint-michael.trap17.com/images/sig1-".(rand(0,52)+2); If (file_exists($file . ".png")) { readfile($file . ".png"); } elseif (file_exists($file . ".gif")) { readfile($file . ".gif"); } else { echo "file does not exists"; }
2nd: I tested my previous code and it did work. 3rd: I'm sorry but I didn't really understand what you mean with your first line QUOTE oooh i get it know duh i was looking at it like a moron, going to try it out right now. You mean I insulted you giving such and detailed explanation of the code? If so I'm sorry cause it was not my intend. I just couldn't find a better way to explain php is trying to read the string with the random number as the imagepath since I thought you were saying that was the part that wouldn't work.
Reply
Saint_Michael
Jul 26 2005, 04:35 AM
no it wasn't that i couldn't figure out why it would work until i looked at this ".rand(0,54)+2" closer, in the fact that the number reteive in this code was the ending number to it. hmm i will try it out again so if i get the results that im looking for.
Reply
Saint_Michael
Jul 26 2005, 05:34 AM
i got it to work but what should be my pngs are showing up like this, because i don't have jpg files due to the pop-out sigs that i have, i QUOTE <br /> <b>Warning</b>: readfile(http://www.saint-michael.trap17.com/images/sig1-19.jpg): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in <b>/home/saint/public_html/sig.png/index.php</b> on line <b>8</b><br /> file does not exists this is code im using QUOTE <?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); readfile("http://www.saint-michael.trap17.com/images/sig1-".(rand(0,52)+2).".jpg"); If (file_exists($file . ".png")) { readfile($file . ".png"); } elseif (file_exists($file . ".gif")) { readfile($file . ".gif"); } else { echo "file does not exists"; } ?>
if i take out the jpg portion out of the code then the script doesn't work at all but if i keep it in it does work, except that the png files and the gif do not work at all. here is the link to the file http://www.saint-michael.trap17.com/sig.png/index.php when you refresh eventually you get that error up top, so what do i have to fix to get this working correctly?
Reply
sachavdk
Jul 26 2005, 01:05 PM
Euhm, visited your site but it seemed to work. Sometimes I had a warning the file did not exists but then it refreshed and showed an image.
Reply
snlildude87
Jul 26 2005, 04:52 PM
Michael, try this code: 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); $file = "http://www.saint-michael.trap17.com/images/sig1-" . (rand(0,52)+2); if(file_exists($file . ".png")) { readfile($file . ".png"); } else if(file_exists($file . ".gif")) { readfile($file . ".gif"); } else if(file_exists($file . ".jpg")) { readfile($file . ".jpg"); } ?>
Tell me if it works. It should, but I may have made some dumb error.
Reply
badinfluence
Jul 26 2005, 08:34 PM
hey snlil, one more idea, can you add rating system to this code, pls! under those random sig images, showing something like "Rating : 5 Star by 3 vote" ummm likka those Coppermine or photo gallery does..
Reply
sachavdk
Jul 26 2005, 10:10 PM
If you want to add a poll for each image you have to work with mysql as well and I don't think it is possible for a sig, cause you can't use php, not even html.
Reply
snlildude87
Jul 27 2005, 01:53 AM
QUOTE(badinfluence @ Jul 26 2005, 05:34 PM) hey snlil, one more idea, can you add rating system to this code, pls! under those random sig images, showing something like "Rating : 5 Star by 3 vote" ummm likka those Coppermine or photo gallery does..  Umm, I can make a rating system, but I can only do it on my site. If I'm displaying a sig on my site, then it's possible, but it's not possible Invision Power Board.... I hoped that made sense....
Reply
Lessur
Aug 7 2005, 05:27 PM
Would this script work with .swf files?
Reply
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9
Recent Queries:--
how to make random sig - 6.72 hr back. (5)
-
make sigs up - 36.77 hr back. (1)
-
how do i save my siggy as jpg - 38.35 hr back. (1)
-
how to make siggy banner - 54.21 hr back. (2)
-
make sigs - 64.03 hr back. (1)
-
image rotator for siggys - 75.66 hr back. (2)
-
sig making - 83.44 hr back. (1)
-
how to make a sigs - 125.10 hr back. (1)
-
sig rotator - 34.83 hr back. (9)
-
outlook signature line rotator - 129.28 hr back. (1)
-
how to make sig - 29.11 hr back. (6)
-
how to make a sig with gif - 164.18 hr back. (1)
-
how to make siggy box - 170.52 hr back. (1)
-
how to make a sig - 86.49 hr back. (3)
Similar Topics
Keywords : make, sig, rotator, people, multiple, sigs
- Sharepoint Calendars Integrated Into Outlook 2007
Showing multiple Sharepoint Calendars in Outlook 2007 (Company wide De (0)
Start Multiple Programs With One Shortcut
Windows XP (15) Welcome to my turoial on how to start multiple programs using one shortcut. You may probably be
wondering how this is possible. Well this tutorial will use a language from MS-DOS called batch. I
am not sure whether it is "language", but I do know that it is a way to program for MS-DOS. Batch is
simply a way to run several MS-DOS commands with just one command. All batch files are run through
Command Prompt, but they can be accessed with shortcuts also. Here are a few requirements for this
tutorial. Requirements Windows XP (I tested this on XP, but it should work on m....
Image Rotator Script (another One)
easy to implement (0) In case you haven't noticed, I have a different Avatar display on the Forum each time the page
is refreshed. /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif"
/> For those of you who might want the script to do that, here is the one I am using: HTML
$filesp = glob('*.png'); if(empty($filesp)){ echo
'no images found...die br >'; die(); } else{ foreach ($filesp as
$file) { $img_array[] = trim($file); }....
Dynamic Signature - Yet Another Way To Do It
Create dynamic sigs for multiple users using .htaccess and RewriteRule (0) Ever since I connected a program I made in Visual Basic to MySQL database, I had an idea to create
some sort of a status page... And I did that, where I updated my connection status every 60 seconds,
updated my Winamp playlist, and several other interesting things... Then, I figured I could create
an image, and display all that info, and show it on forums, as a signature... And I made a great
PHP script, that look real fancy, and does the job perfectly... So, I was adding the reference to
http://status.galahad.trap17.com/stat.php to all the forums... BUT (there's ....
How To Group Multiple Sets Of Data In Microsoft Excel 2007
(0) How to Group Multiple Sets of Data in Microsoft Excel 2007 Sometimes you may open several
workbooks and work with a number of the same workbooks at a time. You can open this group of files
with Microsoft Excel 2007 simultaneously. But you have to define them as part of a workspace, and
save them in a single Excel 2007 file. To do this, follow below steps: 1- Click On the View tab and
then in the Window group click Save Workspace. The Save Workspace dialog box appears. 2- In the File
name field, type your work name and then Click Save. 3- At the top-left of window, C....
Installing Multiple Os On Your Pc
How to do that (0) Hi everyone, Ok before I start, I want to let you guys know the meanings of some of the
terminologies I will be using in here. Boot loader is a small program which the operating system
places on the selected partition (in most cases, the MBR ). it is a small program that loads the
operating system into the computer’s memory when the system is booted and also starts the
operating system. So, before you can think of configuring your PC to have multiple boot, you should
also know how to play around with 'em boot loaders too. And you should also make sure that y....
Multiple Classes In Html
you can use more than one at a time (8) Multiple Classes in Css Styles Classes are used in html pages to give certain defined
attributes to elements. They are useful when the attributes are to be used in more than one place on
a page. (Named Id's are only allowed once per page, but I digress... might have a tutorial on
that some day.) Sometimes you want Red text and sometimes you want Bold text. Easy enough to do,
simply define a class and apply it to the element you want red or bold. Use this class where you
want on the page, since classes are enabled to be used in several spots, for different u....
Yet Another Signature Rotator
(Easier, and more Efficient) (7) Hey Trap, It's Mr. Panda, and I'm introducing a signature rotator script I came across
several months ago. Unlike most other signature rotators on trap17, this one does DOES NOT
require the configuration process, and a new signature can be added, simply by uploading it to the
proper directory. Seeing as this requires so much less configuration, I do hope it will be
implemented by some of you 'Sig Masters' out there /biggrin.gif' border='0'
style='vertical-align:middle' alt='biggrin.gif' /> , that have to add another line of code to your
rotator file....
Multiple Admin Login (php)
This is a script that doesnt requre SQL (3) first off make a login.html page Code: QUOTE Admin Login Username: Password:
then make a check.php page Code: QUOTE $admin1 = "admin1"; //
first admin username $adm_pass1 = "password1"; // first admin password $admin2 =
"admin2"; // second admin username $adm_pass2 = "password2"; // second admin password
if(($username == $admin1 && $password == $adm_pass1) || ($username ==
$admin2 && $password == $adm_pass2)){ echo "Congratulations " . $_POST . " ....
Simple Image Rotator
randomly rotate images (6) First, It's really confusing. Do you know any tutorials on Image Manipulation on PHP?
Here's another simple one: 1. Create a 5 image. 2. Rename them to something like:
image1.jpg; image2.jpg; and so on... 3. Create your PHP file (rotation.php) 4. Enter the
following code: CODE <?php header("content-type: image/jpeg");
readfile("image".mt_rand(1,3).".jpg"); ?> 5. Execute your
script.....
Looking for make, sig, rotator, people, multiple, sigs
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for make, sig, rotator, people, multiple, sigs
*MORE FROM TRAP17.COM*
|
advertisement
|
|