I want to be able to perform an action on power failure i.e when electricity goes off since my network routers are on UPS so it doesn't know about power failures so somehow I want to be able to store the power failure data into a text file through php so anyway possible to write power-failure data to a text file through PHP??
Here is a screenshot of Mikrotik with different windows open regarding the question :