LiLCruz Posted November 21, 2008 Share Posted November 21, 2008 Hi I'm new to php and would like to know how does Aeon on this forum http://forums.narutofan.com/showthread.php?p=19712997 change his gifs when you reload the page i ask him but he gave me no response i guess he didn't want to tell me :'(.can someone please tell how i do this because i want to do the same thing.i think he has he's gifs hosted on his website. ??? i saw php end of the gifs so i came here. Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/ Share on other sites More sharing options...
Maq Posted November 21, 2008 Share Posted November 21, 2008 Depends on how dynamic you want it to be. But here's the pseudo. 1) Have a folder with 3 images, "image1", "image2", and "image3". 2) Assign a variable $image_num with a random number (1, 2, or 3). 3) When you load the image it should look something like: Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695603 Share on other sites More sharing options...
LiLCruz Posted November 21, 2008 Author Share Posted November 21, 2008 http://link83.110mb.com/gifs/sig.php click it it changes when you reload this what I'm trying to do i think you told me how do but I'm kinda confused. do i have to host the folder somewhere sorry being a nub.btw i don't have a website do i have make one do this? to use it on that forum. Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695660 Share on other sites More sharing options...
Maq Posted November 21, 2008 Share Posted November 21, 2008 do i have to host the folder somewhere sorry being a nub Where are the images going to live? It's OK, we all start somewhere. btw i don't have a website do i have make one do this? Yeah... How will your code get executed and rendered without one? Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695662 Share on other sites More sharing options...
LiLCruz Posted November 21, 2008 Author Share Posted November 21, 2008 ok ima make website like him 110mb.com after i make it were i put this code? Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695670 Share on other sites More sharing options...
laffin Posted November 21, 2008 Share Posted November 21, 2008 the php code is easy, as all it does is load up the image file and send the output. if ya have yer images as say, sig_1.gif,sig_2.gif,sig_3.gif,sig_4.gif..... we can make it really simple <?php header('Content-type: image/gif'); readfile("sig_". rand(1,4) .".gif"); ?> however this wont work in most img tags as they check the extension, ya can either use path_info or htaccess rewrite to work around it Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695676 Share on other sites More sharing options...
LiLCruz Posted November 21, 2008 Author Share Posted November 21, 2008 thanks for the replies ok made the website but i don't see nothing on php but i see stuff to install like PHP-Fusion PHP-Nuke phpBB2 phpBB3 which one do i install? and on File Manager a made a folder and put the gifs after that I'm lost i think im doing something wrong. Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695726 Share on other sites More sharing options...
Maq Posted November 21, 2008 Share Posted November 21, 2008 thanks for the replies ok made the website but i don't see nothing on php but i see stuff to install like PHP-Fusion PHP-Nuke phpBB2 phpBB3 which one do i install? To answer your question, whichever you want/like. Why are you asking about forums when you don't even know how to start a website? and on File Manager a made a folder and put the gifs after that I'm lost i think im doing something wrong. Well what are you doing? Do you have any code? What's the problem? Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695759 Share on other sites More sharing options...
LiLCruz Posted November 21, 2008 Author Share Posted November 21, 2008 thanks for the replies ok made the website but i don't see nothing on php but i see stuff to install like PHP-Fusion PHP-Nuke phpBB2 phpBB3 which one do i install? To answer your question, whichever you want/like. Why are you asking about forums when you don't even know how to start a website? and on File Manager a made a folder and put the gifs after that I'm lost i think im doing something wrong. Well what are you doing? Do you have any code? What's the problem? nope don't have code yet problem is don't know where put the code :'(. sorry about that forums thing did not know what those are. Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-695789 Share on other sites More sharing options...
laffin Posted November 22, 2008 Share Posted November 22, 2008 Wut was giving by everybody is how to make a dybamic image (if its yer website). the code I posted with lil modifcation is how to make a dynamic sig image (if its on a forum ya want to use it on) since Aeon was able to post a php file as an image ya use the script i gave ya, yer image host (free webserver, no ads). and use something like [img]http://www.mywebserver.com/mysig.php[/img] Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-696139 Share on other sites More sharing options...
LiLCruz Posted November 24, 2008 Author Share Posted November 24, 2008 thank you i finally got it . Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-697448 Share on other sites More sharing options...
Maq Posted November 24, 2008 Share Posted November 24, 2008 Awesome. I wasn't sure what you exactly were trying to do. So you were actually trying to make a dynamic signature with changing images...? Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-697721 Share on other sites More sharing options...
LiLCruz Posted November 24, 2008 Author Share Posted November 24, 2008 yep all i wanted do is what laffin said dynamic sig image. Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-698046 Share on other sites More sharing options...
laffin Posted November 24, 2008 Share Posted November 24, 2008 Remember to hit solved Congrats LiL Cruz Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-698049 Share on other sites More sharing options...
LiLCruz Posted November 24, 2008 Author Share Posted November 24, 2008 I will thx everybody learned something today. Quote Link to comment https://forums.phpfreaks.com/topic/133672-solved-php-random-gif-help-please/#findComment-698052 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.