First, you will need to create a table `users_online` in your database (and have access to one). Also, create at least 3 columns (id, ip and time) set as: int(11), varchar(15) and varchar(11). Next, you need the code to appear in your page_header, you can save the code as a file, and include it; or just paste the code directly in your header.