How to convert URL to base 64

I want to convert, a Url into base 64 format, is there any possible way except encodebase64string() function

  Discussion posts and replies are publicly visible