Archiv rubriky PHP
Google Maps API for Business – REST URL signing
If you are a Google Maps API Business user, you have to sign REST URLs for invoking webservices. Here you can find an example how to do it in PHP: function base64_encodesafe($plainText) { $base64 = base64_encode($plainText); return strtr($base64, ‚+/‘, ‚-_‘); } function base64_decodesafe($base64) { $base64 = strtr($base64, ‚-_‘, ‚+/‘); return base64_decode($base64); } $key = base64_decodesafe(GMAPS_KEY); […]
PHPMailer 5.1 + encryption
Mod to PHPMailer 5.1 suitable for encrypting the body using public key (openssl_pkcs7_encrypt). Recipient must be holder of associated private key in order to decrypt the body. Can be used together with signing – body is signed and then encrypted in this case (no matter in which order you call Sign() and Encrypt() functions). Usage […]