Zend certified PHP/Magento developer

Connect external system to M2EE database

My question is if I want to connect a php file that lives externally from Magento meaning not on the Magento server. Where would I find a tutorial

I am not looking for how to write a query. I also know what file to find the cridentials for the magento sql connection. My question is more how would I find the server url and or how do I make the Magento server not block the external connection from this external php file? Our Magento is a 2.4 Enterprise (Adobe-hosted) site.