altrasurfer;10983402 wrote:
From what I understand, browser agent might work but I don't know how since I just started PHP.
No it won't. The browser agent string is nothing but a string literal which a browser may or may not send. Some browsers let you set this yourself, and with very little programming knowledge, it's easy to create your own request specifying any browser agent string you like.
altrasurfer;10983402 wrote:
I dont want to block all IP addressed except mine to view it.
Why not? This seems like an excellent approach to doing it, at least if you have a static ip.
altrasurfer;10983402 wrote:
Hi all, I'm trying to figure out how to block all web browsers from trying to access a file.
If you don't want to block all but your own IP, then I suggest you create an authentication system. That is, you use sessions and require a user to log in to access anything other than the login page / or whatever file(s) you want to protect.