title: cUrl google search
body: <p>I use php curl to show Google results into my page. It works when I use English words in the query but when I use Greek words then it does not show any results. Why is that ?</p>
  
  <pre><code>$url = 'http://ajax.googleapis.com/ajax/services/search/web?rsz=large&amp;v=1.0&amp;hl=el&amp;q='.$query;
                  $ch = curl_init();
                  curl_setopt($ch, CURLOPT_URL, $url);
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                  curl_setopt($ch, CURLOPT_REFERER, $_SERVER['REQUEST_URI']);
                  $body = curl_exec($ch);
                  curl_close($ch);
  
                  $json = new Services_JSON();
                  $json = $json-&gt;decode($body);
  
                  foreach($json-&gt;responseData-&gt;results as $searchresult)
                  {
                    if($searchresult-&gt;GsearchResultClass == 'GwebSearch')
                    {
                      echo '&lt;div class="searchresult"&gt;';
                        echo '&lt;a href="' . $searchresult-&gt;unescapedUrl . '" target="_blank"&gt;' . $searchresult-&gt;titleNoFormatting . '&lt;/a&gt;';
                        echo $searchresult-&gt;content;
                        echo $searchresult-&gt;visibleUrl;
                      echo '&lt;/div&gt;';
                    }
                  }
  </code></pre>