public function cost($to, $text) 
    {
        $url = self::HOST . self::COST;
        $this->id = null;

        $params = $this->get_default_params();
        $params['to'] = $to;
        $params['text'] = $text;

        $result = $this->request($url, $params);
        $result = explode("\n", $result);

        return array(
            'code' => $result[0],
            'price' => $result[1],
            'number' => $result[2]
        );
    }
public function cost($to, $text) 
    {
        $url = self::HOST . self::COST;
        $this->id = null;

        $params = $this->get_default_params();
        $params['to'] = $to;
        $params['text'] = $text;

        $result = $this->request($url, $params);
        $result = explode("\n", $result);

        return array(
            'code' => $result[0],
            'price' => $result[1],
            'number' => $result[2]
        );
    }
public function cost ( $ to , $ text ) { $ url = self :: HOST . self :: COST ; $ this -> id = null ; $ params = $ this -> get_default_params ( ) ; $ params [ 'to' ] = $ to ; $ params [ 'text' ] = $ text ; $ result = $ this -> request ( $ url , $ params ) ; $ result = explode ( "\n" , $ result ) ; return array ( 'code' => $ result [ 0 ] , 'price' => $ result [ 1 ] , 'number' => $ result [ 2 ] ) ; }
Get message cost

@param type $to
@param type $text
@return type
Get message cost