※aws4class.phpファイルの244行目から著名認証のプログラムを加えます。 242 if ($this->ResponseGroup) 243 $this->baseURL .= '&ResponseGroup='.$this->ResponseGroup; // この下に加える 244 } ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 242 if ($this->ResponseGroup) 243 $this->baseURL .= '&ResponseGroup='.$this->ResponseGroup; $secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // シークレットアクセスキー $ret_char = "\n"; $url_array = parse_url($this->baseURL); parse_str($url_array[query], $param_array); $param_array[Timestamp] = gmdate("Y-m-d\TH:i:s\Z"); ksort($param_array); $str = "GET".$ret_char.$url_array[host].$ret_char.$url_array[path].$ret_char; $str_param = ""; while( list($key, $value) = each($param_array) ){ $str_param = $str_param.strtr($key, "_", ".")."=".rawurlencode($value)."&"; } $str = $str.substr($str_param, 0, strlen($str_param)-1); $signature = base64_encode( hash_hmac("sha256", $str, $secret_key, true) ); $this->baseURL = "http://".$url_array[host].$url_array[path]."?".$str_param."Signature=".rawurlencode($signature); }