public static function signUrlForGoogle(string $sUrlToSign, string $sClientId, string $sPrivateKey) : string
    {
        $aUrl = parse_url($sUrlToSign);
        $aUrl['query'] .= '&client=' .$sClientId;

        $aUrlToSign = $aUrl['path']."?".$aUrl['query'];

        $decodedKey = base64_decode(str_replace(array('-', '_'), array('+', '/'), $sPrivateKey));

        $sSignature = hash_hmac("sha1", $aUrlToSign, $decodedKey, true);

        $sEncodedSignature = str_replace(array('+', '/'), array('-', '_'), base64_encode($sSignature));

        $sOriginalUrl = $aUrl['scheme']."://".$aUrl['host'].$aUrl['path'] . "?".$aUrl['query'];

        return $sOriginalUrl. '&signature='. $sEncodedSignature;
    }
public static function signUrlForGoogle(string $sUrlToSign, string $sClientId, string $sPrivateKey) : string
    {
        $aUrl = parse_url($sUrlToSign);
        $aUrl['query'] .= '&client=' .$sClientId;

        $aUrlToSign = $aUrl['path']."?".$aUrl['query'];

        $decodedKey = base64_decode(str_replace(array('-', '_'), array('+', '/'), $sPrivateKey));

        $sSignature = hash_hmac("sha1", $aUrlToSign, $decodedKey, true);

        $sEncodedSignature = str_replace(array('+', '/'), array('-', '_'), base64_encode($sSignature));

        $sOriginalUrl = $aUrl['scheme']."://".$aUrl['host'].$aUrl['path'] . "?".$aUrl['query'];

        return $sOriginalUrl. '&signature='. $sEncodedSignature;
    }
public static function signUrlForGoogle ( string $ sUrlToSign , string $ sClientId , string $ sPrivateKey ) : string { $ aUrl = parse_url ( $ sUrlToSign ) ; $ aUrl [ 'query' ] .= '&client=' . $ sClientId ; $ aUrlToSign = $ aUrl [ 'path' ] . "?" . $ aUrl [ 'query' ] ; $ decodedKey = base64_decode ( str_replace ( array ( '-' , '_' ) , array ( '+' , '/' ) , $ sPrivateKey ) ) ; $ sSignature = hash_hmac ( "sha1" , $ aUrlToSign , $ decodedKey , true ) ; $ sEncodedSignature = str_replace ( array ( '+' , '/' ) , array ( '-' , '_' ) , base64_encode ( $ sSignature ) ) ; $ sOriginalUrl = $ aUrl [ 'scheme' ] . "://" . $ aUrl [ 'host' ] . $ aUrl [ 'path' ] . "?" . $ aUrl [ 'query' ] ; return $ sOriginalUrl . '&signature=' . $ sEncodedSignature ; }
get the URL with the signature for the Pro account of Google Map

@access public
@param unknown $sUrlToSign
@param unknown $sClientId
@param unknown $sPrivateKey
@return string
get the URL with the signature for the Pro account of Google Map