I would guess that many of us are interested in helping
Google decide to support ISO 23950.
On the benefit side, my hope is that Google will appreciate
the value of deep access to geospatial as well as bibliographic
resources. Perhaps they will also appreciate that their own
Google API needs to become more sophisticated as they delve
into different kinds of collections.
On the cost side, I think we can demonstrate that the Google
API is not so very different from the SRW profile of ISO 23950.
Toward that goal, I am developing a little mock-up that shows
equivalences between the Google API and SRW. That mock-up is
at http://www.gils.net/srwGoogle.html .
You can simply "view source" to see the Javascript converter.
If you want to get serious in this, please do get your own
license key from Google as my API license only allows about
100 searches a day (1000 total results). You may also may want
to install the attached PHP page on your own server.
I know there are issues with this mock-up. One obvious need
is for software to convert Google API responses to SRW.
There are also issues with mapping certain Google indexes
at the LoC catalog server (e.g., rec.lastModificationDate,
rec.languageCode, rec.formatCode, and an index for Google's
"web pages that have links to the specified web page".)
I would appreciate help in fixing any problems you see!
Eliot
Eliot Christian, USGS, 590 National Center, Reston VA 20192
cell: 571-212-8294 office: 703-648-7245 fax: 703-648-7112
<html>
<head>
<title>Post Google search message to host for Google API</title>
</head>
<body>
<p>
<textarea rows="50" cols="160" wrap="virtual">
<?php
$request = stripslashes($HTTP_POST_VARS['postSOAP']);
$request_length = strlen($request);
$host = "api.google.com";
$apiurl = "http://api.google.com/search/beta2";
$header = "POST $apiurl HTTP/1.1\r\n";
$header .= "MessageType: CALL\r\n";
$header .= "Content-Type: text/xml\r\n";
$header .= "Content-Length: $request_length\r\n";
$header .= "Connection: close\r\n\r\n";
$header .= "$request\r\n";
$socket = @fsockopen($host, 80, $errno, $errstr, 30);
if (!$socket) {
print "Failed socket open for $host [ $errno ]: $errstr ";
} else {
fputs($socket, $header);
while(!feof($socket)) {
$output[] = fgets($socket);
}
fclose($socket);
$numElements = count($output);
for($counter=0; $counter < $numElements; $counter++) {
print "$output[$counter] ";
}
}
?>
</textarea>
</p>
</body>
</html>
|