Mikrotik External Captive Portal
This is an example of a PHP based external captive portal for Mikrotik. The code given here can be used to setup a basic captive portal featuring an HTML login form. It is based on the external captive portal code given the in Mikrotik Wiki:
https://wiki.mikrotik.com/wiki/HotSpot_external_login_page
This code will authorize the user with the username admin and a blank password.