• Sign Up
    • OpenID
    • Google
    • Yahoo!
    • Facebook
    • Ning
  • Discuss
  • New Topic
  • Categories
  • Forum
  • Debate
  • Languages
    • English
    • Finnish
    • Arabic
    • Italian
    • Korean
    • French
    • Chinese(Traditional)
    • Chinese(Simplified)
    • Swedish
    • Czech
    • Hindi
    • Dutch
    • Norwegian
    • Russian
    • Croatian
    • German
    • Japanese
    • Bulgarian
    • Portuguese
    • Chinese
    • Spanish
    • Greek
  • Login

Ok

Ask a Question



Welcome New Members!

zhangwigs

chandan...

jimmy b...

moneyma...

stacyjohn

Emile

Tiffany

CBIL360

Lawsons

christi...

meiwei

kingkhan

brendaj...

swati

sunnyjohn

conniejohn

sunnyping

fengmi

califor...

hengjiao


Hot Topics

array code column content Custom database drupal element field file form function index jquery module MySQl node page PHP query server something SQL string table theme time user VALUE way

 

 

 

Reason

 

How to search Bing Images with PHP?

Cutie101

Cutie101
Since Bing image uses JavaScript to display image pages, how does one search Bing Images using PHP?

I tried just Curl but it returns a page without any images.

I will give you soundcloud 1k+ plays within 24-hours for $5


In PHP | 70 Replies | 7253 Views | 1 month ago
JavaScript Curl image search PHP
  • Report Abuse
  • Email
  • Add to Favorites

Rate Now:   1 2 3 4 Average Rating: 0.00 / 1 ratings


Replies:

Guest

Guest
You will need to use the BING API for image searches and you'll need to use JSON for that. Here is some PHP code for searching/fetching images from BING:

<?php
    $apiNumber = '<your-api-key>';
    $countImage = '5';
 
$url = 'http://api.bing.net/json.aspx?AppId='.$apiNumber.'&Query='.urlencode($node->title).'&Sources=Image&Version=2.2&Market=en-us&Adult=Strict&Image.Count='.$countImage.'&Image.Offset=0&JsonType=raw';
   
$file = @file_get_contents($url, 1000000);
   
$bingImageResult = json_decode($file);
    if(isset(

$bingImageResult->SearchResponse->Image->Results)){
        $output .= '<div id="bingImage-wrap"><ul id="imageList">';
        foreach(

$bingImageResult->SearchResponse->Image->Results as $value) {
           
$imageVal ='<img width="'.$value->Thumbnail->Width.'" height="'.$value->Thumbnail->Height.'" alt="'.$getNode->title.'" title="'.$getNode->title.'" src="'.str_replace("&","&",$value->Thumbnail->Url).'" />';
            $output .= '<li class="resultlistitem">'.$imageVal.'</li>';
        }
       

$output .= '</ul><div class="clear"></div></div>';
    }
   echo

$output;
?>

Read more: http://www.phpinformer.com/answers/How-to-search-Bing-Images-with-PHP.html?msg=1#ixzz1YEjZ5jjU
 

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
-1'

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
-1'

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

Guest

Guest
1

  • Reply to Answer
  • 1 month ago
  • Report Abuse
  • By Guest

Rate Now: 1 2 3 4 Average Rating: 0.00 / 0 ratings

Replied by Guest 1 month ago

  • First
  • Previous
  • 1
  • 2
  • 3
  • 4
  • Next
  • Last

Your Response:

Join

Login


 

Related Questions

How can I search Bing Images with PHP?
0 Answers | 4973 Views
How do I search Google Images with PHP?
1 Answer | 4575 Views
Is there a PHP function that will return an array of all of my uploaded ima...
1 Answer | 3321 Views
What would be the best way to submit data with images?
0 Answers | 3336 Views
How can I configure the Search module in Drupal?
1 Answer | 3800 Views
Disclaimer | Privacy Policy | Terms | ■ RSS | Sitemap | Contact Us | ■ Invite | Create your Widget | ■ Twitter | ■ Facebook
© 2013 PHPInformer. All rights reserved

PHPInformer does not evaluate or guarantee the accuracy of any PHPInformer content. Click here for the Full Disclaimer.