Mercurial > hg > extraction-interface
comparison _xampp/contrib/soap.php @ 0:b12c99b7c3f0
commit for previous development
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 19 Jan 2015 17:13:49 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b12c99b7c3f0 |
---|---|
1 <?php | |
2 header("Content-Type: text/html; charset=utf-8;"); | |
3 ?> | |
4 <html> | |
5 <head> | |
6 <title>PHP und SOAP</title> | |
7 </head> | |
8 <body> | |
9 <?php | |
10 | |
11 $client = new SoapClient('http://api.google.com/GoogleSearch.wsdl'); | |
12 | |
13 $apikey="apikey hier einsetzen"; | |
14 $searchfor="xampp"; | |
15 | |
16 $result = $client->doGoogleSearch($apikey, $searchfor, 0, 10, false, '', true, '', '', ''); | |
17 | |
18 echo "Gefundene Seiten: ".$result->estimatedTotalResultsCount; | |
19 | |
20 echo "<ol>"; | |
21 foreach ($result->resultElements as $hit) | |
22 { | |
23 echo "<li><a href=\"".$hit->URL."\">".$hit->title."</a>"; | |
24 echo "<br>".$hit->snippet; | |
25 } | |
26 echo "</ol>"; | |
27 ?> | |
28 </body> | |
29 </html> |