I'm looking for an approach in order to connect to my database from a plugin that I'm building. This plugin is going to be publicly available so the connection information would be seen by users.
Plugin needs to use data from my server's database and as it is an external database for my users wordpress websites and not in their server, I have to use something like PDO or mysqli_connect and the connecting information will be in the code which I don't want to happen.
I wonder if there is a way to connect my database without sharing my connection information in the code OR encoding that part of code or whole code without needing an extra decoder to be installed in clients server.
I have tried Ioncube encoder as well and it was pretty good but that need an extension to be installed in my clients server in order to decode and run the plugin.
It's really important for me to not share the connecting information of my database. I MUST use my database in this plugin. Thanks.