@ 2013-10-23T16:20:27Z <?php
$request = 'POST';
$url = '/';
$headers = array(
'X-Wix-Signature' => '3elavUOF0-I1_7tGz2XZKs_HSlrygsMiblpNFPKv3Ik',
"X-Wix-Instance-Id" => "132fc751-9325-63d3-a605-f74e0c25192a",
"X-Wix-Event-Id" => "da390885-e72f-4a93-be7f-a90220bac5c7",
"X-Wix-Event-Type" => "/provision/provision",
"X-Wix-Timestamp" => "2013-10-23T15:39:34.462Z",
"X-Wix-Application-Id" => "132fbf95-d58e-f9ed-86e8-48b76f901d91"
);
//$body = "{\n\t\"instance-id\": \"1328a7fe-e451-8780-d201-0c5d9a1fc02b\"\n}";
$body = '{"instance-id":"132fc751-9325-63d3-a605-f74e0c25192a"}';
<?php
$request = 'POST';
$url = '/';
$headers = array(
'X-Wix-Signature' => '3elavUOF0-I1_7tGz2XZKs_HSlrygsMiblpNFPKv3Ik',
"X-Wix-Instance-Id" => "132fc751-9325-63d3-a605-f74e0c25192a",
"X-Wix-Event-Id" => "da390885-e72f-4a93-be7f-a90220bac5c7",
"X-Wix-Event-Type" => "/provision/provision",
"X-Wix-Timestamp" => "2013-10-23T15:39:34.462Z",
"X-Wix-Application-Id" => "132fbf95-d58e-f9ed-86e8-48b76f901d91"
);
//$body = "{\n\t\"instance-id\": \"1328a7fe-e451-8780-d201-0c5d9a1fc02b\"\n}";
$body = '{"instance-id":"132fc751-9325-63d3-a605-f74e0c25192a"}';
$appSecret = "97cfac6e-b061-4007-a03e-eb4bc199e620";
function concat($request, $url, $headers, $body)
{
// Request Method and Url separated by \n
$result = trim($request);
$result .= "\n";
$result .= trim($url);
$result .= "\n";
// Sort Wix-* headers by key
ksort($headers);
// concatenate Wix-* headers (trimmed and separate by comma)
$first = true;
foreach ($headers as $header) {
if ($header != 'X-Wix-Signature' && $first == true) {
$result = $result . trim($header);
$first = false;
} else if ($header != 'X-Wix-Signature') {
$result = $result . ',' . trim($header);
}
}
// Add body
$result = $result . "\n" . trim($body);
return $result;
}
$concat = concat($request, $url, $headers, $body);
// Encrypt with hmac and app secret
$encrypted = hash_hmac('sha256', $concat, $appSecret);
//$base64 = base64_encode($encrypted);
echo "The computed signature is : " . $encrypted . "\n";
echo "The signature sent by Wix : " . $headers['X-Wix-Signature'];
// {
// "Host": "signature.wix.codeoasis.com",
// "X-Wix-Signature": "3elavUOF0-I1_7tGz2XZKs_HSlrygsMiblpNFPKv3Ik",
// "X-Wix-Instance-Id": "132fc751-9325-63d3-a605-f74e0c25192a",
// "X-Wix-Event-Id": "da390885-e72f-4a93-be7f-a90220bac5c7",
// "Content-Type": "application/json; charset=utf-8",
// "X-Wix-Event-Type": "/provision/provision",
// "X-Wix-Timestamp": "2013-10-23T15:39:34.462Z",
// "X-Wix-Application-Id": "132fbf95-d58e-f9ed-86e8-48b76f901d91",
// "Connection": "keep-alive",
// "Accept": "*/*",
// "User-Agent": "Dispatch/0.10.1",
// "Content-Length": "54",
// "body":
// {
// "instance-id":"132fc751-9325-63d3-a605-f74e0c25192a"
// }
// }
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.21 0.008 0.034 12.38 5.4.20 0.014 0.038 12.37 5.4.19 0.010 0.042 12.37 5.4.18 0.013 0.038 12.37 5.4.17 0.013 0.039 12.38 5.4.16 0.011 0.058 12.37 5.4.15 0.010 0.042 12.37 5.4.14 0.017 0.052 12.06 5.4.13 0.012 0.042 12.04 5.4.12 0.009 0.043 12.01 5.4.11 0.010 0.042 12.01 5.4.10 0.007 0.044 12.00 5.4.9 0.015 0.052 12.00 5.4.8 0.010 0.045 12.00 5.4.7 0.011 0.041 12.00 5.4.6 0.009 0.042 12.00 5.4.5 0.023 0.059 12.00 5.4.4 0.015 0.036 11.99 5.4.3 0.012 0.046 11.98 5.4.2 0.012 0.041 11.97 5.4.1 0.015 0.053 11.98 5.4.0 0.015 0.052 11.47 5.3.27 0.015 0.051 12.72 5.3.26 0.013 0.050 12.72 5.3.25 0.014 0.048 12.72 5.3.24 0.014 0.048 12.72 5.3.23 0.013 0.049 12.71 5.3.22 0.015 0.046 12.68 5.3.21 0.013 0.050 12.68 5.3.20 0.024 0.065 12.68 5.3.19 0.014 0.042 12.67 5.3.18 0.011 0.042 12.67 5.3.17 0.018 0.041 12.67 5.3.16 0.027 0.064 12.67 5.3.15 0.012 0.048 12.67 5.3.14 0.010 0.045 12.66 5.3.13 0.021 0.057 12.65 5.3.12 0.010 0.058 12.66 5.3.11 0.012 0.054 12.66 5.3.10 0.019 0.076 12.12 5.3.9 0.015 0.049 12.09 5.3.8 0.010 0.047 12.07 5.3.7 0.022 0.067 12.08 5.3.6 0.010 0.047 12.07 5.3.5 0.012 0.042 12.00 5.3.4 0.013 0.045 12.00 5.3.3 0.012 0.044 11.94 5.3.2 0.018 0.055 11.72 5.3.1 0.012 0.044 11.69 5.3.0 0.012 0.047 11.67
preferences:dark mode live preview
135.96 ms | 1394 KiB | 7 Q