Today I decided to make my own simple 2 Factor Authentication system using the IFTTT webhooks system to send a code to my phone, in future I wish to modify this to use my own notification system but this is the first version so I made it easier for myself by using another library for the time being.
Quick Code Breakdown
The code for this is rather simple for now, PHP generates a random number and saves it in a session.
After the code is saved to the session we then send it to the IFTTT webhook which sends the code to my phone where we input the received code onto the page and another script checks the code against the saved one, if they match then we allow the user into the site, if not we redirect back to the login page.
A quick side note: This system does not impliment any actual username/password login system it is just the 2 factor part