<?php /**/ ?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
    <title>GoogleSearch.php</title>
  </head>
  <body>
  <?php
  ini_set(
    'include_path',
      ini_get( 'include_path' ) . PATH_SEPARATOR . "/home/rdhyee/pear/lib/php" . PATH_SEPARATOR . '/usr/local/lib/php'
      );
  require 'SOAP/Client.php';

  $wsdl=new SOAP_WSDL(
      'http://api.google.com/GoogleSearch.wsdl');
  $google = $wsdl->getProxy();
  print_r ($wsdl->generateProxyCode());

  // Create an object directly from the proxy code
  $key = "X1aouJfkHBmo11Bc2LEv0GxdQogHFex1";
  $q = "Bach";
  $start = 0;
  $maxResults=10;
  $filter = false;
  $restrict = '';
  $safeSearch = false;
  $lr = 'lang_en';
  $ie = '';
  $oe = '';
  echo $google->doSpellingSuggestion($key, 'diktionary');
  #print_r($google);

  $results =$google->doGoogleSearch($key, $q, $start, $maxResults, $filter, $restrict, $safeSearch, $lr, $ie, $oe);
  #print $results; 
  print_r ($results);
  ?>
  </body>
</html>
