;-) Hab mal eins gemacht.... am suchen... gefunden am extrahieren
Ich hoffe das funktioniert, ist alt und ich hab zusammenkopiert.
CODE
<?php
require_once("nusoap.php");
$key = ".......";
$start = 0;
$soapclient = new soapclient("http://api.google.com/search/beta2"); // [1]
$parameters = array(
"key" => $key,
"q" => $query,
"start" => $start,
"maxResults" => 10,
"filter" => false,
"restrict" => "",
"safeSearch" => false,
"lr" => "lang_de",
"ie" => "UTF-8",
"oe" => "UTF-8"
);
$result = $soapclient->call("doGoogleSearch", $parameters, "urn:GoogleSearch");
$searchtime = $result["searchTime"];
$begin = $start + 1;
$end = $start + $parameters["maxResults"];
$total = $result["estimatedTotalResultsCount"];
for ($i = 1; $i <= $parameters["maxResults"]; $i++)
{
$element = $result[$i];
$url = $element["URL"];
$title = $element["title"];
$snippet = $element["snippet"]; // [2]
echo <a href="'.$url.'">'.$url.'</a><br>';
}
?>
Needed File
nusoap.php
QUOTE
/*
NuSOAP - Web Services Toolkit for PHP
Copyright © 2002 NuSphere Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
If you have any questions or comments, please email:
Dietrich Ayala
dietrich@ganx4.com
http://dietrich.ganx4.com/nusoap
NuSphere Corporation
http://www.nusphere.com
*/