$val) { if($val != "") { $check_str .= '&' . str_replace('%7E', '~', rawurlencode($key)) . '=' . str_replace('%7E', '~', rawurlencode($val)); } } $check_str = substr($check_str,1); $arrParseUrl = parse_url($_REQUEST['EndPoint'] . $_REQUEST['type']); $check_str = "GET\n" . $arrParseUrl['host'] . "\n" . $arrParseUrl['path'] . "\n" . $check_str; $_REQUEST['Signature'] = base64_encode(hash_hmac('sha256', $check_str, $_REQUEST['SecretKey'], true)); } if($_REQUEST['mode'] != 'signature') { if($_REQUEST['Signature'] != "") { $signature = urlencode($_REQUEST['Signature']); $url .= "&AccessKeyId={$_REQUEST['AccessKeyId']}&Timestamp={$_REQUEST['Timestamp']}&Signature={$signature}"; } $response = file_get_contents($url); } } $type = $_REQUEST['type']; ?>
EC-CUBE API TEST