Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4539352
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:56:05+00:00 2026-05-21T14:56:05+00:00

I need an image grabber. By that I mean a Digg like image grabber

  • 0

I need an image grabber. By that I mean a Digg like image grabber that can search other pages (including youtube, normal websites, economist,…whatever), get the images that are of decent sizes and if I select it, I can upload it to my server.

Does anyone know of a plugin for this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T14:56:05+00:00Added an answer on May 21, 2026 at 2:56 pm

    I don’t know about any off-the-shelf library. But I once needed a quick way to retrieve the “main image” off a page. My best guess was to just get the largest in file size. I was using the PHP SimpleHTMLDom library for easy access to the site’s <img> tags.

    Now, here’s the main part of the code, that returns the URL of the biggest image file for a given page.

    Hope you can build on that.

    // Load the remote document
    $html = file_get_html($url);
    
    $largest_file_size=0;
    $largest_file_url='';
    
    // Go through all images of that page
    foreach($html->find('img') as $element){
        // Helper function to make absolute URLs from relative
        $img_url=$this->InternetCombineUrl($url,$element->src);
        // Try to get image file size info from header:
        $header=array_change_key_case(get_headers($img_url, 1));
        // Only continue if "200 OK" directly or after first redirect:
        if($header[0]=='HTTP/1.1 200 OK' || @$header[1]=='HTTP/1.1 200 OK'){
            if(!empty($header['content-length'])){
                // If we were redirected, the second entry is the one.
                // See http://us3.php.net/manual/en/function.filesize.php#84130
                if(!empty($header['content-length'][1])){
                    $header['content-length']=$header['content-length'][1];
                }
                if($header['content-length']>$largest_file_size){
                $largest_file_size=$header['content-length'];
                $largest_file_url=$img_url;
                }
            }else{ 
                // If no content-length-header is sent, we need to download the image to check the size
                $tmp_filename=sha1($img_url);
                $content = file_get_contents($img_url);
                $handle = fopen(TMP.$tmp_filename, "w");
                fwrite($handle, $content);
                fclose($handle);
                $filesize=filesize(TMP.$tmp_filename);
                if($filesize>$largest_file_size){
                $largest_file_size=$filesize;
                $largest_file_url=$img_url;
                unlink(TMP.$tmp_filename);
                }
            }
        }
    }
    return $largest_file_url;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my image is 1. Normal repeat-x is 2. I need image repeat like this
I have a need of a function/library that can quickly encrypt an image on
I need to detect Image format to save a image like image1.jpg, image2.gif, but
I need to convert image sequences(ie,png) to video file in iPhone. How i can
I need to flip an image so that a character faces in the right
I need to match a image url like this: http://site.com/site.com/files/images/img (5).jpg Something like this
I have to create website in PHP, which need image editor functionality like image
I need an Image that is grayed out when disabled (IsEnabled=False). A grayed out
I need load image from assets I can read text file but i can
I need an image compression program that works in Linux that is capable of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.