Hi all, i try to find a php code they can verify on a local machine if the user have a file exemple : IF (theuseraccesstothepage have c:\1.txt)
{
Make that
}
else
{
Make that
}
Can someone help me please ?
php code they can verify on a local machine if the user have
Moderator: General Moderators
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: php code they can verify on a local machine if the user have
You can't, not in PHP
Applications in Flash or AIR can do this; but even then, only with the user's permission
Applications in Flash or AIR can do this; but even then, only with the user's permission
Re: php code they can verify on a local machine if the user have
Can i check in a file on a share folder in my network ?
Like if username are in the file then ...
Like if username are in the file then ...
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: php code they can verify on a local machine if the user have
You can access shared drives, yes.
But why do you want to do anything this way?
But why do you want to do anything this way?
Re: php code they can verify on a local machine if the user have
I need something to can tell me who is the user are trying to connect and a string will tell to php use this page of this page for this person
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: php code they can verify on a local machine if the user have
That kind of thing is best done with a login function, with all the information about users and pages stored on the server. If you're going to play around setting up shared drives, then you need a shared drive for every single user, and it all needs to be within a tight local network, and the overhead inyour code will be horrendous.... especially as you'd need some way of identifying which shared drive was associated with which user... and they'd have to identify themselves so you knew which shared drive to access.
If you really want to, get them to log in once, and set a permanent "remember me" cookie that identifies who they are.
If you really want to, get them to log in once, and set a permanent "remember me" cookie that identifies who they are.
Re: php code they can verify on a local machine if the user have
Ok, the other thing i have for idea, can i capture the username of the user with php ?
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: php code they can verify on a local machine if the user have
Not with PHP. It is sometimes possible with javascript (depending on the browser being used, and what OS the user is running on).fraz wrote:Ok, the other thing i have for idea, can i capture the username of the user with php ?
What is wrong with a login screen or a cookie? It's how everybody else in the world does this.
Re: php code they can verify on a local machine if the user have
I know but we are in intranet and all users is already log to the domain so i jsut need to detect with office they are !