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

  • Home
  • SEARCH
  • 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 7874981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:54:27+00:00 2026-06-03T02:54:27+00:00

I need to show a big image that was searched by google throu simple_html_dom.php

  • 0

I need to show a big image that was searched by google throu simple_html_dom.php

 include_once( "simple_html_dom.php" );
       $key="alexis";
       $html = new simple_html_dom();
       $html=file_get_html('http://images.google.com/images?as_q='. $key .'&hl=en&imgtbs=z&btnG=Search+Images&as_epq=&as_oq=&as_eq=&imgtype=&imgsz=m&imgw=&imgh=&imgar=&as_filetype=&imgc=&as_sitesearch=&as_rights=&safe=images&as_st=y');
 foreach($html->find('a') as $element) {
 preg_match('#(?:http://)?(http(s?)://([^\s]*)\.(jpg|gif|png))#', $element->href,  $imagelink);
 echo $imagelink['1'];
 }

Results:

http://beautiful-pics.org/wp-content/uploads/2011/06/Alexis_Bledel_4.jpghttp://liberalvaluesblog.com/wp-content/uploads/2009/03/alexis-bledel-gg02.jpghttp://cdn0.sbnation.com/imported_assets/119825/alexis.jpghttp://www.hdwallpapersarena.com/wp-content/uploads/2012/04/alexis-dziena-3163.jpghttp://www.nba.com/media/celtics/alexis-diary300422.jpghttp://beautiful-pics.org/wp-content/uploads/2011/06/Alexis_Bledel_5.jpghttp://www.popcrunch.com/wp-content/uploads/2009/03/amanda-alexis-lee2.jpghttp://www.tvfunspot.com/forums/images/realityshows/survivor16/alexis.jpghttp://access.nscpcdn.com/gallery/i/b/bledel/AlexisBlei_4705661.jpghttp://2.bp.blogspot.com/_UaLWp72nij4/S_cccrvmFsI/AAAAAAAAMM8/yjVXCl3sHT4/s1600/alexis-bledel.jpghttp://3.bp.blogspot.com/-RFJoXjDSnmQ/T4cPwZwgrjI/AAAAAAAABlY/aNlgZ3ZFknU/s1600/Alexis%252BBledel-03.jpghttp://images2.fanpop.com/images/photos/4200000/Alexis-Bledel-alexis-bledel-4218179-590-768.jpghttp://www.hawktime.com/sitebuildercontent/sitebuilderpictures/AlexisArguello.jpghttp://4.bp.blogspot.com/–iAuASq2RFc/TveqvJ2j8vI/AAAAAAAABvg/RzTmjASqK_0/s400/alexis-bledel.jpghttp://www.mtv.com/news/photos/a/american_idol/09/top36/10_alexis_grace.jpghttp://images.buddytv.com/articles/the-bachelor/images/alexis.jpghttp://cdn01.cdnwp.thefrisky.com/wp-content/uploads/2010/02/03/vanity-fair-020310-main.jpghttp://www.chorva.net/wp-content/uploads/2009/04/alexis-bledel.jpghttp://images2.fanpop.com/images/photos/3500000/Alexis-Bledel-alexis-bledel-3523783-454-600.jpghttp://www.pocandpoch.com/wp-content/gallery/alexis-and-lauren/alexis-bledel.jpg

But i need a link just for the first one image , 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-06-03T02:54:28+00:00Added an answer on June 3, 2026 at 2:54 am
    include_once( "simple_html_dom.php" );
           $key="alexis";
           $html = new simple_html_dom();
           $html=file_get_html('http://images.google.com/images?as_q='. $key .'&hl=en&imgtbs=z&btnG=Search+Images&as_epq=&as_oq=&as_eq=&imgtype=&imgsz=m&imgw=&imgh=&imgar=&as_filetype=&imgc=&as_sitesearch=&as_rights=&safe=images&as_st=y');
     foreach($html->find('a') as $element) {
     if(preg_match('#(?:http://)?(http(s?)://([^\s]*)\.(jpg|gif|png))#', $element->href,  $imagelink)){
        echo $imagelink[1];
        break;
     }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to show/hide big image by clicking on thumbnails? I need like this Try
I need good and small plugin to show bigger image. One requirement is that
I have a client app that need to show a really big tree (It's
I have an big image which I need to show in a smaller container
I need a table GUI control that is able to quickly add and show
I need to be able to show an image along with two lines of
I need show a notication modal window.. But since its a fluid layout the
me again... I need show 10 or 20 or 50 results number of results
I need to show a modal popup if the user has selected a treeview's
I need to show an integer value in a TextBox in my C# Windows

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.