hi i'm download Random Image for external site

Comments

  • 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.
  • 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.
  • 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;
    `
Sign In or Register to comment.