Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $content = file_get_contents('php://input');
- // chip collect
- //if ( openssl_verify( $content, base64_decode($_SERVER['HTTP_X_SIGNATURE']), 'public_key', 'sha256WithRSAEncryption' ) != 1 ) {
- // chip send
- if ( openssl_verify( $content, base64_decode($_SERVER['HTTP_X_SIGNATURE']), 'public_key', 'sha512WithRSAEncryption' ) != 1 ) {
- exit('wrong signature');
- }
- $content_decoded = json_decode($content, true);
- if ($content_decoded['status'] == 'completed') {
- // do something here
- }
Add Comment
Please, Sign In to add comment