Cookie and IP are way to insecure, cookies, I wont even go there and IP's can be spoofed, easily.
If you just want to have basic protection, you can use a .htaccess rule (if its linux) with one User & pass to share.
It won't be any PHP effort, and there's even htacess generator's available if you search google.
It is the most basic / easy method.