How to create script php "user online/offline"

how to make a php script so that the website says whether the user is online or offline