Należy ściągnąć sobie NUSOAP http://dietrich.ganx4.com/nusoap
a potem coś takiego:
<?
# Use the NuSOAP php library
require_once('nusoap.php');
# Set parameters
$parameters = array(
'key'=>'insert key here',
'q' => $HTTP_GET_VARS['query'],
'start' => '0',
'maxResults' => '10',
'filter' => 'false',
'restrict' => '',
'safeSearch' => 'false',
'lr' => '',
'ie' => 'latin',
'oe' => 'latin'
);
# Create a new SOAP client, feeding it GoogleSearch.wsdl on Google's site
$soapclient = new soapclient('http://api.google.com/GoogleSearch.wsdl', 'wsdl');
# query Google
$results = $soapclient->call('doGoogleSearch',$parameters);
# Results?
if ( is_array($results['resultElements']) ) {
print "<p>Your Google query for '" . $HTTP_GET_VARS['query'] . "' found "
. $results['estimatedTotalResultsCount'] . " results, the top ten of which
are:</p>";
foreach ( $results['resultElements'] as $result ) {
"<p><a href='" . $result['URL'] . "'>" .
( $result['title'] ? $result['title'] : 'no title' ) .
"</a><br />" . $result['URL'] . "<br />" .
( $result['snippet'] ? $result['snippet'] : 'no snippet' ) .
"</p>";
}
}
# No Results
else {
print "Your Google query for '" . $HTTP_GET_VARS['query'] . "' returned no results";
}
?>
http://cvs.sourceforge.net/viewcvs.py/*checkout*/nusoap/lib/nusoap.php?rev=1.95
<FORM ACTION="http://www.google.pl/search" METHOD="get">
<INPUT TYPE="text" NAME="q">
<INPUT TYPE="hidden" NAME="ie" VALUE="ISO-8859-2">
<INPUT TYPE="hidden" NAME="sitesearch" VALUE="domena">
<INPUT TYPE="submit" VALUE="Szukaj">
</FORM>
<FORM ACTION="http://www.google.pl/search" METHOD="get" target="_blank">
<input type="radio" checked name="lr" value="lang_pl" onfocus="blur()">polska
<input type="radio" name="lr" value="" onfocus="blur()">¶wiat
<input type="text" name="q">
<input type="hidden" name="ie" value="ISO-8859-2">
<input type="submit" value="Szukaj w Google" onfocus="blur()">
</FORM>
Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 11 gości