Created
December 16, 2019 16:44
-
-
Save jasminsuljic/c685ad80f9f125b299610ae6a8bd9aa0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = $protocol . $_SERVER['SERVER_NAME'] . dirname($_SERVER['REQUEST_URI']); | |
$full_url = $url.'?'.$_SERVER['QUERY_STRING']; | |
$url_parsed = parse_url(preg_replace('/&digest=[^&]*/', '', $full_url)); | |
$calculated_url = $url_parsed['scheme'].'://'.$url_parsed['host'].$url_parsed['path'].'?'.$url_parsed['query']; | |
//Generate digest | |
$checkdigest = hash('sha512', $this->pikpaykey.$calculated_url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment