PHP 4.2.02 using SOAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, i'm confussed because i have been testing a client soap using a
webservice built in Delphi. That works OK, but when i tried to use, for
example the Google Search webservice, i receive nothing in the result array.
The other problem is that i can't see the fault code due to the PHP version.
Could be the recomendation upgrading PHP?

Here there is the code

// ------------------------

$parametros = array('key' => 'SmjRaZtQFHLSvBlTlYOsJZV0bIB2uPmS',
                     'q' => $_GET['q'],
      'start' => 0,
      'maxResults' => 15,
      'filter' => false,
      'restrict' => '',
      'safeSearch' => false,
      'lr' => '',
      'ie' => 'latin',
      'oe' => 'latin'
         );


require ('nusoap.php');
 $s = new soapclient('http://api.google.com/GoogleSearch.wsdl', 'wsdl');
  $results =
$s->call('doGoogleSearch',$parametros,'urn:GoogleSearch','urn:GoogleSearch')
;


 if ( is_array($results['resultElements']) ) {
    print "<p>Resultados para '" . $_GET['q'] . "'.  Encontrados "
    . $results['estimatedTotalResultsCount'] . " resultados, los 10 primeros
son:</p>";
    foreach ( $results['resultElements'] as $result ) {
       print
          "<p><a href='" . $result['URL'] . "'>" .
          ( $result['title'] ? $result['title'] : 'sin t&iacute;tulo' ) .
          "</a><br />" . $result['URL'] . "<br />" .
          ( $result['snippet'] ? $result['snippet'] : 'sin recorte' ) .
          "</p>";
    }
 } else print 'No hay resultados....<br><br>';



// ------------------------

Thanks beforehand
Jr/

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux