public function verifySignature($uri, $secret, $paramName)
    {
        $getParams = array();
        parse_str(parse_url($uri, PHP_URL_QUERY), $getParams);

        if (!isset($getParams[$paramName])) {
            return false;
        }

        // Explode hash and data from eachother
        $parts = explode('.', $getParams[$paramName]);

        $data = array_pop($parts);

        // Decode the data
        $data = json_decode($this->base64UriDecode($data));

        // Create a new signature based on the secret and data and compare it to the data
        // we're verifying, if it is correct, return the signed data.
        if ($this->createSignature($secret, $data) === $getParams[$paramName]) {
            return $data;
        }

        return false;
    }
public function verifySignature($uri, $secret, $paramName)
    {
        $getParams = array();
        parse_str(parse_url($uri, PHP_URL_QUERY), $getParams);

        if (!isset($getParams[$paramName])) {
            return false;
        }

        // Explode hash and data from eachother
        $parts = explode('.', $getParams[$paramName]);

        $data = array_pop($parts);

        // Decode the data
        $data = json_decode($this->base64UriDecode($data));

        // Create a new signature based on the secret and data and compare it to the data
        // we're verifying, if it is correct, return the signed data.
        if ($this->createSignature($secret, $data) === $getParams[$paramName]) {
            return $data;
        }

        return false;
    }
public function verifySignature ( $ uri , $ secret , $ paramName ) { $ getParams = array ( ) ; parse_str ( parse_url ( $ uri , PHP_URL_QUERY ) , $ getParams ) ; if ( ! isset ( $ getParams [ $ paramName ] ) ) { return false ; } // Explode hash and data from eachother $ parts = explode ( '.' , $ getParams [ $ paramName ] ) ; $ data = array_pop ( $ parts ) ; // Decode the data $ data = json_decode ( $ this -> base64UriDecode ( $ data ) ) ; // Create a new signature based on the secret and data and compare it to the data // we're verifying, if it is correct, return the signed data. if ( $ this -> createSignature ( $ secret , $ data ) === $ getParams [ $ paramName ] ) { return $ data ; } return false ; }
Verify Signature and get Signed Data

@param string $uri URI to Verify and Get Data from
@param string $secret Private Secret
@param string $paramName Name of URI Parameter to verify
@return array with valid data or false
Verify Signature and get Signed Data