private function Array2string($arr, $glue = '&') {
    if (!is_array($arr)) {
      throw new Exception('Argument arr must be array');;
    }
    $new = array();
    foreach ($arr as $k => $v) {
      $new[] = urlencode($k) .'='. urlencode($v);
    }
    return implode($glue, $new);
  }