Search code examples
phpcakephpflickrpicasa

How to extract thumbnail image from flickr and picasa videos using php?


How to extract thumbnail image from flickr and picasa videos using php

please can anyone help me out...


Solution

  • Assume you can see the image in your browser. So, first of all, you need to get the link contained url of the image(s).

    To get this, you should simple analyze content of viewed page and perform regulat expression match like this;

    <?php
    
    ob_start();
    
    $content = ob_get_contents();
    
        function find_all_img_url_in_cur_page(){
          global $content;
    
          $result = array();
    
          if ( preg_match('/jpg/i', $content) ){
             //find postion and add into array
           }
          return $result;
        }
    
        find_all_img_url_in_cur_page();
    
        ob_end_clean();
        ?>
    

    then you need to copy/open this IMG file currently you are dealing with (using standard GD library usually bundled with php).

    Google for "image resize with php", so after you'll get what you want