How to check if a file exist on the client side? (PHP)?
-
I want to add some kind of security to my website... I want it to ONLY OPEN the website WHEN a certain file is found on the client side... for example PC1 has the file "check.txt" while PC2 does not... I want to access a website name www.website.com. When the users open that site. the first thing that the site it going to do is check PC1 and PC2 if "check.txt" exists. if it does then it continues to the website content. if it doesn't then it just leaves the website blank.. it this possible? I'm not talking about LOCAL PHP like Xampp, i'm talking about an uploaded website on a webserver. can anyone help me? :)
-
Answer:
Your PHP script runs on the web server. It does not have access to the file system on the client. If it did, that would be a terrifyingly huge security problem. Would you want any random website you visited to be able to see the contents of your hard drive?
Jed Ong at Yahoo! Answers Visit the source
Other answers
Indeed, that would be a huge security vulnerability, you're probably best off using a simple cookie, session or even just good old fashioned http authentication :)
Christopher Elison
Related Q & A:
- How to know if a file has 'access' monitor in linux?Best solution by Unix and Linux
- How to check whether a cell in a DataGridView is changed or not?Best solution by Stack Overflow
- How to check if a web page loads?Best solution by Server Fault
- How do I send a file in Yahoo mail?Best solution by Yahoo! Answers
- How can I send a file to a friend on Hotmail?Best solution by askdavetaylor.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.