Results 1 to 6 of 6

Thread: Random Image and Hosting

  1. #1
    Junior Trainer
    Junior Trainer

    Join Date
    Jan 2003
    Posts
    360

    Default Random Image and Hosting

    Trying to pull off a random image generator something like the ones explained on these pages I found:
    http://www.scriptarchive.com/rand_image.html
    http://www.davelozinski.com/scripts/...1265#download2

    I want to get a random image to use for things like forum sigs, etc. so it would have to be at one stable. No javascript or anything. I tried pulling off some of the codes on the sites I looked at, but either:
    A)Host dosen't accept PHP codes
    B)I'm doing it wrong.
    I tired using a free host called awardspace.com that said they were compatable with php, but I couldn't get the random image stuff working correctly.
    So if anyone knows of any good hosts to try this on (free, if any) and maybe some experience with something like this (it seems simple enough, but maybe I'm missing something) I'd be thankful.
    Hey guys.

  2. #2
    Dragon Tamer Administrator
    Administrator
    Lady Vulpix's Avatar
    Join Date
    Oct 2000
    Location
    34.625 S, 58.50595 W (Buenos Aires, Argentina)

    Default Re: Random Image and Hosting

    As far as I can see, the code on the 1st link is written in Perl, not PHP. And the second one is for use within a web page, not between [img] tags on a message board.

    Annual Unown Awards: Kind (2007), Friendly, Queen (2008), Dedicated (2009), She found Kevin! (2009),
    Everyone wins (2011), Tea, World traveler (2012), Busy, Patient (2013),
    Durga, Firefox, Twenty Thousand Hidden Posts (2014), Helpful (2015),
    Active, Discord, Letter, Unown Awards 2019 (2019).

    Don't forget to visit the Dragon's Guild and Dragon Tamers site.
    ✭Ask me about AC/CC. Adopt a pokemon and Join!✭

  3. #3
    Junior Trainer
    Junior Trainer

    Join Date
    Jan 2003
    Posts
    360

    Default Re: Random Image and Hosting

    Well, regardless of it being php or not- I want any method of random off-site images on a free host. If anyone knows of any way to do that...
    Hey guys.

  4. #4
    Advanced Trainer
    Advanced Trainer
    Sceptile_Master's Avatar
    Join Date
    Mar 2004
    Posts
    1,657

    Default Re: Random Image and Hosting

    Award space is good. I have some PHP scripts running with them. Yeah there good, I'd stick with them. But for the script. Currently my web design doesn't go past (x)html, css and javascript. Can't help you there.
    Pokemon Pearl FC: 3479 9091 3139

  5. #5
    Veteran Trainer
    Veteran Trainer

    Join Date
    Sep 2002
    Location
    The Fanfiction Forum
    Posts
    19,535

    Default Re: Random Image and Hosting

    Hmm... I'm not too familiar with PHP, myself. However, I found a script here that might help you. If that isn't what you need, then I'd recommend running a Google search and just sifting through the results.
    IT HAS RETURNED.
    THE TPM MAIN SITE.

    Quote Originally Posted by Gavin Luper View Post
    Holy crap ... I'VE become a grammar nazi, too.

  6. #6

    Default Re: Random Image and Hosting

    Quote Originally Posted by Lady Vulpix
    And the second one is for use within a web page, not between [img] tags on a message board.
    It still works. I guess it depends on the forum board, but for the most part, it works. (It works in vB too)

    http://www.davelozinski.com/scripts/...image1.php.txt
    That's from your second link. All you do is upload that script to your server then make an "images" directory and upload your images into that directory. And of course, make sure it has .php extension, not .txt.

    So your directory tree should be like:
    /
    random_image.php
    /images

    /images
    picture1.jpeg
    pikachu.jpg
    etc.gif
    (btw, your images can only be .jpg, .jpeg, and .gif)

    and then you add it to your sig:
    [ img ]http://yoursite.com/random_image.php[ /img ]

    If it doesn't work, try changing this line in the script: $IMAGE_DIRECTORY = "../images/";
    to: $IMAGE_DIRECTORY = "./images/"; (remove first period)

    Good luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •