Staredit Network

Staredit Network -> Computers and Technical -> Help...
Report, edit, etc...Posted by EdAi on 2005-12-25 at 21:06:03
mmkay, basicly i have some cool sigs and i can't decide which to use, previously i saw this guy that had some code or something so whenever u reloaded a page he had posted on, it loaded a different sig, and he had like 4 sigs, so when u refreshed tha page, it cycled through them in order, i was just wondering if any of u know this "code", and if so, what is it??
Report, edit, etc...Posted by Pie_Sniper on 2005-12-25 at 23:01:48
Do you have a server equipped with PHP?

Oh well, if you do, then Google is your friend: Code
He said he hasn't tested it, but using my general programming knowledge from C++, I'm pretty sure it will work.
Report, edit, etc...Posted by Shmeeps on 2005-12-26 at 00:35:19
CODE

<?

// tell the user's browser that it is an image
header("Content-type: image/png");  

$rand = rand(1,4);

// load the background
$image = imagecreatefrompng("$rand.png");

// and now... we display the image
imagepng($image);
imagedestroy($image);
?>

Save that as randomsig.png.

Then, make a .htaccess and in it put:
CODE

<Files *.png>
     ForceType application/x-httpd-php
</Files>


Upload them both to the same file, then img link to it. Should work, I'm using code thats just a modified version of mine.
Report, edit, etc...Posted by Deathawk on 2005-12-26 at 00:48:39
I seriously think you're going to have to explain all of that to him again.
Report, edit, etc...Posted by Pie_Sniper on 2005-12-26 at 00:55:20
Explain what?

From my understanding, he needs to change 4 to the number of signatures he has and then name each signature 1.png, 2.png, etc. for Shmeeps'.
Report, edit, etc...Posted by Shmeeps on 2005-12-26 at 12:17:38
Yup, that's it.

Although you might have to put $sig in braces {}, sometimes it works with, sometimes not, really depends on the function. I don't know because mine writes all the text to image, I don't have multiple images.
Report, edit, etc...Posted by EdAi on 2005-12-28 at 18:21:25
O.O

i have no experience with PHP so... unless u have a pre-made code that i can just copy and paste i won't understand anything
Report, edit, etc...Posted by Doodle77(MM) on 2005-12-28 at 22:42:10
Well, first you need to check if you webhost has PHP.
Report, edit, etc...Posted by Shmeeps on 2005-12-29 at 00:01:02
I'd also suggest you learn it, not only will you not have to copy and paste, but it'll do you good later.
Report, edit, etc...Posted by Shadow_da_Sniper on 2005-12-29 at 12:44:19
Here's to PHP learning:


http://www.php.net/manual/en/



Enjoy!
Report, edit, etc...Posted by EdAi on 2005-12-29 at 13:39:53
mmkay, go ahead and look elsewhere, i might be a few weeks...........
Report, edit, etc...Posted by Deathawk on 2005-12-29 at 13:44:02
I told you.
Report, edit, etc...Posted by Centreri on 2005-12-29 at 18:22:02
PHP is hard to learn >.>
I'm thinking of it as my 'thing to learn before I got on to programming' happy.gif
Good luck.
Report, edit, etc...Posted by EdAi on 2005-12-31 at 14:41:04
aaah, ty ty ty... *sigh*
i'm already confused, no need to help me, i'll just read thru i again......

*sigh*
Next Page (1)