API NEW LOGIN METHOD

Hello ,
Ok i have been searching for monthes on the new API login method from mikrotik for versions above 6.43.
I found many solutions and scripts but the most important part is how and where to change the code. I use PHP-MIXBILL for my billing system and most of you are familiar with.
Where do i edit the code of the part of routeros connection ? i am good in coding but not a pro. If can anyone give a detailed setup on where exactly to change the login method in the ROUTEROS Api files.
Thank you very much