How do I use the login for an external application? Long ago I built a php based application for room reservations which basically ran on its own – outside the website's CMS. It was part of what I would now call a custom made intranet – or "custom-app". 

Now the main website finally runs on drupal – but now we have the drupal login and the custom-app login. How could I now 'teach' the custom-app to accept visitors that are already logged in to the dp based CMS? 

I know, the 'easiest' or actually 'most correct' way of doing this would probably be to develop the custom-app into a module. But are there other ways e.g. to pass the login information over to the custom-app? Any pointers would help. Thank you!

update1: both are running on the same server under the same domain. 

update2: I finally came across this question "How to call drupal_bootstrap from custom file in subfolder?" – I guess going bootstrap would be the right direction for now…
You can install in your drupal site a contrib module which allow you to create an API which can access another modules.

You can use Services module which implements route to allow users login across external sites, and another route to get the current user logged in. 

So you can install this module and enable this routes, and with your php site make http calls to this sites to log in the user and check if he is logged in.