![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Feb 2010
Posts: 655
|
![]() Hi guys,i am looking for a random image script in php.
I´ve checked many sites but i am not able to find what i am looking for. I would like to rotate a couple of thumbs from a folder randomly. I have about 20 folders and all the thumbs should go on one page. Actualy 20 rotating thumbs on the page (20 folders x 5 thumbs per folder). No java for now,i need it in php. Any suggestions? Thanks in advance |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jul 2006
Location: Somewhere between reality and total ape-shit bonkers.
Posts: 2,870
|
![]() Here's one I used to make a fake TGP a long time back and it worked like a charm in that it allows for link attributes. If you don't want to link the images, just leave the fields blank in the ini sheet.
http://www.alistapart.com/articles/betterrotator/
__________________
The best Adult Affiliate Programs reviewed and indexed by niche and feature. Easily find the sponsors that suit your needs. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Arthur Flegenheimer
Industry Role:
Join Date: Jul 2006
Location: New York City
Posts: 11,056
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Oct 2001
Location: Toronto
Posts: 7,103
|
You can try this is you just want something simple: http://ma.tt/scripts/randomimage/
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
|
__________________
Make a bank with Chaturbate - the best selling webcam program ![]() ![]() ![]() Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!! PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email: ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
Quote:
http://randaclay.com/tips-tools/mult...ge-php-script/
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Feb 2010
Posts: 655
|
Thanks a lot guys
![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Aug 2009
Location: me at smellynose.com
Posts: 206
|
I wrote this in the GFY quick reply box, so who knows if it has errors.
![]() Code:
<?php define('BASE_DIR', '/var/www/mysite/images/'); // Where are your images? define('IMAGE_LIMIT', 10); // how many images to show? $files = glob(BASE_DIR.'*'); $images = Array(); if(empty($files)) { die("Hey, dude, there are no files. What happened?"); } foreach($files as $v) { if(is_dir($v)) { foreach($files as $v) { // This should be a function which can loop through further sub directories if needed //get exif image type, if it's an image append to array $images[] = $v; } } else { $images[] = $v; } } shuffle($images); // Randomise the array for($i=0;$i<IMAGE_LIMIT;$i++) { $img = $images[$i]; if(empty($img)) { break; // Might be best doing a foreach above whilst keeping $i as a loop counter and breaking the loop once you reach the limit } $img_src = end(explode("/", $img)); echo "<img src='{$img_src}'/>"; }
__________________
I'm a PHP developer - 594086663 - [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Industry Role:
Join Date: Feb 2010
Posts: 655
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |