20 return $this->cfg->param;
30 protected function doAction($action, array $prm) {
31 $prm = array_merge($this->
getDefPrm(), $prm);
32 $url = $this->cfg->url.$action.
'?';
33 foreach($prm as $k=>$v)
35 $content = file_get_contents($url);
37 return json_decode($content);
47 $content = $this->
doAction(
'shorten', array(
'longUrl'=>$longUrl));
48 if ($content->statusCode ==
'OK') {
49 return $content->results->$longUrl->shortUrl;
doAction($action, array $prm)