Example #1
0
 function image_make()
 {
     if ($this->storage->version) {
         return so_dom::make($this->storage->content);
     }
     $query = so_query_compatible::make(array('v' => '1.0', 'q' => $this->search, 'rsz' => 1, 'imgsz' => 'xlarge', 'safe' => 'off'));
     $json = json_decode(so_uri_compatible::make('http://ajax.googleapis.com/ajax/services/search/images?' . $query)->content);
     $image = so_dom::make(array('hyoo_image_search' => null));
     foreach ($json->responseData->results[0] as $prop => $value) {
         $image['@hyoo_image_search_' . $prop] = $value;
     }
     $this->storage->content = $image;
     return $image;
 }
Example #2
0
 function query_store($data)
 {
     return so_query_compatible::make($data);
 }
Example #3
0
 function frame_make()
 {
     $query = so_query_compatible::make(array('text' => $this->text, 'searchid' => $this->searchId, 'frame' => 1, 'topdoc' => 'http://hyoo.ru/' . (string) $this->uri));
     return so_uri_compatible::make('http://yandex.ru/sitesearch' . $query->uri);
 }