Password protecting a php file and logging when it is accessed
<p>How do i force users to login to see a file with Php? Basically I am logging user history and I want to protect it. Its nothing critical, just like searches of things they perform, so a simple login/pass is good. </p>

<p>Also, on my server, i want to append this file with user history. So I need to be able to write to this file. </p>

<p>THanks!</p>
