configuring users database on my own

hello everyone
actually one day i was thinking about running hotspot but with a custom program that i made connecting to mikrotik and submit new users or charge their credit of using internet,is there something i should do in mikrotik or in my program ?

Notice:i saw this somewhere but don’t know how they do this (keep secret ) :laughing:

Just setup the hotspot to use RADIUS (server profiles). Set the RADIUS settings to point to your program and it will start sending you the RADIUS tokens.

thanks anyway for your help , but could you introduce me some useful and open source radius server .

my goal is from inside of my program written with php have access to database of radius server or even mikrotik to define users automatically .

we use freeradius on to of a mysql database for wireless and hotspot users. works pretty well.