public static function base64UrlSafeEncode($s)
    {
        $s = base64_encode($s);
        $s = str_replace('+', '-', $s);
        $s = str_replace('/', '_', $s);
        $s = str_replace('=', '', $s);
        return ($s);
    }
public static function base64UrlSafeEncode($s)
    {
        $s = base64_encode($s);
        $s = str_replace('+', '-', $s);
        $s = str_replace('/', '_', $s);
        $s = str_replace('=', '', $s);
        return ($s);
    }
public static function base64UrlSafeEncode ( $ s ) { $ s = base64_encode ( $ s ) ; $ s = str_replace ( '+' , '-' , $ s ) ; $ s = str_replace ( '/' , '_' , $ s ) ; $ s = str_replace ( '=' , '' , $ s ) ; return ( $ s ) ; }
Base64 encode in a way that the result can be passed through HTML forms and URLs.
@param $s
@return mixed
Base64 encode in a way that the result can be passed through HTML forms and URLs .