Added encoding to the URL

Added base64_encode() to $url before it is sent meaning that there will be no problems with weird URL's breaking out of the API call.