title: bing api search
body: <p>I am trying to search some images with bing api key.
  I wrote this code but it don't work, and it not return some error.
  I think it is an api error...can you help me?</p>
  
  <pre><code>$accountKey = 's+s/s=';
  $rootUri = 'https://api.datamarket.azure.com/Bing/Search';
  
  // Get the query. Default to 'sushi'.
  $query = ($_GET['q']) ? $_GET['q'] : 'sushi';
  
  // Get the service operation. Default to Web.
  $serviceOp = ($_GET['sop']) ? $_GET['sop'] : 'Web';
  
  // Get the market. Default to en-us.
  $market = ($_GET['market']) ? $_GET['market'] : 'en-us';
  
  $ServiceRootURL =  'https://api.datamarket.azure.com/Bing/SearchWeb/';  
  $WebSearchURL = $ServiceRootURL . 'Web?$format=json&amp;Query=';
  
  $request = $WebSearchURL . urlencode( '\'' . $query. '\'');
  echo $request;
  //$requestUri = "$rootUri/$serviceOp?\$format=json&amp;Query=$query&amp;Market=$market";
  
  $process = curl_init($request);
  curl_setopt($process, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  curl_setopt($process, CURLOPT_USERPWD,  $accountKey . ":" . $accountKey);
  curl_setopt($process, CURLOPT_TIMEOUT, 30);
  curl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);
  $response = curl_exec($process);
  $jsonobj = json_decode($response);
  echo "&lt;br&gt;Ris = ".$jsonobj;
  </code></pre>