Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[18.118.119.229] |
|
Сообщ.
#1
,
|
|
|
Нарыл вот такой вот пример:
require 'SOAP/Client.php'; $query = 'php'; // your Google search terms $soap = new SOAP_Client('http://api.google.com/search/beta2'); $params = array( new SOAP_Value('key', 'string', 'your google key'), new SOAP_Value('q', 'string', $query), new SOAP_Value('start', 'int', 0), new SOAP_Value('maxResults', 'int', 10), new SOAP_Value('filter', 'boolean', false), new SOAP_Value('restrict', 'string', ''), new SOAP_Value('safeSearch', 'boolean', false), new SOAP_Value('lr', 'string', 'lang_en'), new SOAP_Value('ie', 'string', ''), new SOAP_Value('oe', 'string', '')); $hits = $soap->call('doGoogleSearch', $params, 'urn:GoogleSearch'); foreach ($hits->resultElements as $hit) { printf('<a href="%s">%s</a><br />', $hit->URL, $hit->title); } Но такая вот проблема: файл Client.php отсутствует в системе вообще, включая source distribution PHP. Хде искать? |
Сообщ.
#2
,
|
|
|
вопрос снят.
устанавливается как пэкэдж к PEAR: pear install SOAP-0.8RC3 |