The first fatal error on both Linux and Windows is that the SOAP-classes does not exsist. We have now downloaded SOAP from PEAR for Linux, but then a new pakage is missing (HTTP).
First, i don't know anything about XAMPP/Linux. So let us talk about Windows (but it's similar in Linux):
You want use PEAR::SOAP. So let me look. According to the PEAR-Manual:
- Code: Select all
pear.bat list
OK. No package SOAP installed.
- Code: Select all
pear.bat search soap
Oh, only a beta package is availible. No stable. --> XAMPP have no beta packages included.
- Code: Select all
pear.bat install -f soap
"-f" because it's a beta package.
--> now you can use PEAR::SOAP
Script example:
require('SOAP/Client.php');
[snip]
<b>C:\XAMPP\xampp\htdocs\ex\Google SOAP kall.php</b> on line
[snip]
I think PEAR::SOAP is not working with the Google API at the moment. But, i never used SOAP before.
So i make the next test with NuSOAP (and not with PEAR::SOAP).
- Code: Select all
<?php
require_once('nusoap.php');
$parameters = array(
'key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'q' => 'xampp',
'start' => 0,
'maxResults' => 5,
'filter' => true,
'restrict' => '',
'safeSearch' => true,
'lr' => '',
'ie' => '',
'oe' => ''
);
$soapclient = new soapclient('http://api.google.com/search/beta2');
$results = $soapclient->call('doGoogleSearch', $parameters, 'urn:GoogleSearch');
echo '<pre>';
print_r($results);
echo '</pre>';
?>
Hey, that's working fine
BTW:
You can also enable the SOAP-Extension in "php.ini". This extension is included in XAMPP/Windows.