KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to check if a file is opened "locally" (same machine or network). I'm using: <?php if ((substr($_SERVER['REMOTE_ADDR'],0,8) == "192.168.") || ($_SERVER['REMOTE_ADDR'] == "127.0.0.1")) { // client is local } else { // client is not local } But I'm not sure this is the best way. What is a more foolproof way of doing this?
Tags (comma-separated)
Save Edits
Cancel