What's this site using to generate pics from their directory?

Discussion in 'HTML & JavaScript' started by ycfme, Nov 8, 2010.

  1. ycfme

    ycfme Power Member

    Joined:
    Mar 24, 2010
    Messages:
    779
    Likes Received:
    65
    I want to create a site very similar to this one:
    HTML:
    hxxp://www.onlinebikinibabes.com
    How does he do it? In terms of the fetch pics from the chosen directory where thousands of pics are. This site is essentially set on auto-pilot.

    Any feedback would be great
     
  2. likeskoolaid

    likeskoolaid Regular Member

    Joined:
    Dec 27, 2009
    Messages:
    352
    Likes Received:
    105
    Occupation:
    \˚ㄥ˚\
    Location:
    \ᇂ_ᇂ\
  3. likeskoolaid

    likeskoolaid Regular Member

    Joined:
    Dec 27, 2009
    Messages:
    352
    Likes Received:
    105
    Occupation:
    \˚ㄥ˚\
    Location:
    \ᇂ_ᇂ\
    To get the big image to display once clicked, again I'd use a php command called GET from the url.

    So each random image would have their own link you set up in the random image script with a URL something like:

    www.Site-Name.com/index.php?pic=3434934

    Then on your index page you have an image where the source is getting the image number from the URL like this

    <img src="http://www.Site-Name.com/images/<?php echo $_GET["pic"]; ?>.jpg">



    http://www.w3schools.com/PHP/php_get.asp
     
    • Thanks Thanks x 1
  4. ycfme

    ycfme Power Member

    Joined:
    Mar 24, 2010
    Messages:
    779
    Likes Received:
    65
    Hey Thanks for responding to the post.

    I actually got my site up before your post. However, I need to create a method to totally automate the site. For example, I have a crap load of pics. I'd like to create some sort of system where images wll be in queqe for months sort of like an autoblog.

    I also want the site to update 6 times daily.


    What would be the easiest way to go about this? Will it require setting up a
    database?

    Ok, Thanks:baby:
     
  5. heiska

    heiska Junior Member

    Joined:
    Dec 5, 2008
    Messages:
    139
    Likes Received:
    170
    You need to first fetch the images from somewhere, like phun.org or something. Then save the images as "/almost/naked/chicks/forya/girl$number". $number for the first image fetched would be 1, 2 for the second etc.

    Then dynamically show the pics like so: echo "<img src=/almost/naked/chicks/forya/girl".mt_rand(1,$lastchicknumber);

    If you have like 10k images, and show 10 images at a time, chances for showing same image 2 times on the same page are not nonexistant.
     
  6. callum

    callum Newbie

    Joined:
    Oct 10, 2008
    Messages:
    22
    Likes Received:
    1
    Unless there's pre-built software that already does that then there's no real easy way to do it.

    If I was going to do it I would dump all the photos into a directory and make a script that scans the directory, grabs the file names and adds it to the database which you can then just call out the images from there. Then for the 6 updates a day you would need to create cron jobs that automatically get that last update and scan the next six items.
     
  7. ycfme

    ycfme Power Member

    Joined:
    Mar 24, 2010
    Messages:
    779
    Likes Received:
    65
    How difficult would it be to do this? Are there sites/scripts already out there (Free)?

     
  8. GreyWolf

    GreyWolf Executive VIP

    Joined:
    Aug 17, 2009
    Messages:
    1,935
    Likes Received:
    5,644
    Gender:
    Male
    Occupation:
    Artist / Craftsman
    Location:
    sitting at my PC
    You could probably use a script like this one.

    Code:
    http://code.google.com/p/phppi/
     
    • Thanks Thanks x 1
  9. ycfme

    ycfme Power Member

    Joined:
    Mar 24, 2010
    Messages:
    779
    Likes Received:
    65
    Hey GreyWolf,

    Thanks for responding. Do you mine if I PM you? I'd like to share some sites I have up.

     
  10. GreyWolf

    GreyWolf Executive VIP

    Joined:
    Aug 17, 2009
    Messages:
    1,935
    Likes Received:
    5,644
    Gender:
    Male
    Occupation:
    Artist / Craftsman
    Location:
    sitting at my PC
    yeah go ahead and send a pm.