Changeset 7
- Timestamp:
- 11/27/09 06:56:30 (10 months ago)
- Location:
- trunk/lib
- Files:
-
- 2 added
- 1 removed
- 5 modified
- 1 moved
-
Generic/req.XpathScraper.php (deleted)
-
Live/req.LiveSearch.php (moved) (moved from trunk/lib/Search/req.LiveSearch.php)
-
Search/req.Gigablast.php (modified) (1 diff)
-
YahooApi/req.YAnswersSearch.php (modified) (1 diff)
-
YahooApi/req.YahooApi.php (modified) (2 diffs)
-
YahooApi/req.YahooLinks.php (added)
-
YahooApi/req.YahooPages.php (added)
-
YahooApi/req.YahooSearch.php (modified) (2 diffs)
-
YahooApi/req.YahooSuggest.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Search/req.Gigablast.php
r1 r7 1 <?php 2 3 class GigablastSearch extends HttpRequest { 4 public $data; 5 public $query; 6 public $num = 10; 7 8 public $url = ''; 9 10 public function __construct($query) { 11 $this->query = $query; 12 } 13 14 protected function before() { 15 $this->args['q'] = $this->query; 16 $this->args['raw'] = 9; // feed type, 9 = utf8 xml, 8 = plain xml 17 $this->args['sc'] = 1; // site clustering 18 $this->args['dr'] = 1; // remove duplicate results 19 } 20 21 protected function success() { 22 $this->data = new SimpleXMLElement($this->body); 23 } 24 } -
trunk/lib/YahooApi/req.YAnswersSearch.php
r6 r7 55 55 public function __construct($query,$num=null,$sort=null,$searchIn=null,$type=null) { 56 56 $this->query = $query; 57 if($num) $this->num = $num; 58 if($sort) $this->sort = $sort; 59 if($searchIn) $this->searchIn = $searchIn; 60 if($type) $this->type = $type; 61 62 $this->args['appid'] = $this->getAppId(); 57 $this->num = $num; 58 $this->sort = $sort; 59 $this->searchIn = $searchIn; 60 $this->type = $type; 63 61 } 64 62 65 63 protected function before() { 64 $this->args['appid'] = $this->getAppId(); 66 65 $this->args['query'] = $query; 67 66 -
trunk/lib/YahooApi/req.YahooApi.php
r6 r7 13 13 //'bRyF5Z7V34H5q.yCejLKoMm8Nm.U8oNrcuwrtRFiQ6wl1WbbJsXwE.8P0YaOFQ--' 14 14 15 protected $host; 16 public $args = array( 17 'appid'=>'', 18 'output'=>'json'); 15 public $args = array('output'=>'json'); 19 16 public $method = 'get'; 20 17 … … 22 19 return $this->appid; 23 20 } 24 21 public function setAppId($str) { 22 $this->appid = $str; 23 } 25 24 public function httperror() { 26 25 $this->keep = false; -
trunk/lib/YahooApi/req.YahooSearch.php
r6 r7 38 38 $this->number = $number; 39 39 $this->filter = $filter; 40 41 40 } 42 41 … … 72 71 $this->offset += $this->num; 73 72 74 } 75 if($cl < 1) { 73 } else { 76 74 $this->keep = false; 77 75 } -
trunk/lib/YahooApi/req.YahooSuggest.php
r6 r7 17 17 $this->query = $query; 18 18 $this->num = $num; 19 $this->args['appid'] = $this->getAppId();19 20 20 } 21 21 protected function before() { 22 $this->args['appid'] = $this->getAppId(); 22 23 $this->args['query'] = $this->query; 23 24 $this->args['results'] = $this->num;
![(please configure the [header_logo] section in trac.ini)](/trac/chrome/site/your_project_logo.png)