Member
Member
absolutex   2008-08-22, 15:38
#1

in external site i'm use

@readfile('http://127.0.0.1:81/wedding/photography/photos/zp-core/random.php?num=6&height=120&width=120&album=TEST')

but i got Duplicate Images :/

how to get it word ?

Member
Member
fatman   2008-08-23, 23:56
#2

It is designed not to check duplicated images and reload another image for saving some processing time. Actually, for a larger number of images in an album, it is not easy for duplicated images appear.

Member
Member
morethanthesky   2008-08-29, 13:18
#3

Hello Mr. Fatman!

First I want to say a HUGE thanks for the work you've done adding this feature. It's SO wonderful! My users are thrilled and it means less work for me because they can manage their own slideshows. YAY!

Second, I'd like to ask some advice. In order to use this @readfile method, you have to have allow_url_fopen set to on in php.ini which is a big security concern. What are you guys setting on your server to allow only the random.php file to be externally included?

Third, I would like to find out how one volunteers for the documentation project? I love this product and I would love to contribute by writing tutorials.

Thank you in advance.

Member
Member
morethanthesky   2008-08-29, 13:27
#4

Oh! I wanted to offer one more, if less graceful way of including the random image - it does work with allow_url_fopen set to off though. I'd rather use the readfile one because its only one line of code, but I don't know enough yet to know how to tell my server to only allow the random.php file to be included and nothing else.

`
// initiate curl handle
$ch = curl_init();

//set curl options
curl_setopt($ch,CURLOPT_URL,"http://galleries.georgetown.org/zp-core/random.php?num=1&height=200&width=260&class=one-image&album=library-landscaping");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_TIMEOUT,10);

//grab your content and print it out
$content = curl_exec($ch);
echo $content;
`

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.