php code they can verify on a local machine if the user have

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fraz
Forum Newbie
Posts: 7
Joined: Thu Oct 29, 2009 7:55 am

php code they can verify on a local machine if the user have

Post by fraz »

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 ?
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

Post by Mark Baker »

You can't, not in PHP
Applications in Flash or AIR can do this; but even then, only with the user's permission
fraz
Forum Newbie
Posts: 7
Joined: Thu Oct 29, 2009 7:55 am

Re: php code they can verify on a local machine if the user have

Post by fraz »

Can i check in a file on a share folder in my network ?

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

Post by Mark Baker »

You can access shared drives, yes.

But why do you want to do anything this way?
fraz
Forum Newbie
Posts: 7
Joined: Thu Oct 29, 2009 7:55 am

Re: php code they can verify on a local machine if the user have

Post by fraz »

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

Post by Mark Baker »

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.
fraz
Forum Newbie
Posts: 7
Joined: Thu Oct 29, 2009 7:55 am

Re: php code they can verify on a local machine if the user have

Post by fraz »

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

Post by Mark Baker »

fraz wrote:Ok, the other thing i have for idea, can i capture the username of the user with php ?
Not with PHP. It is sometimes possible with javascript (depending on the browser being used, and what OS the user is running on).

What is wrong with a login screen or a cookie? It's how everybody else in the world does this.
fraz
Forum Newbie
Posts: 7
Joined: Thu Oct 29, 2009 7:55 am

Re: php code they can verify on a local machine if the user have

Post by fraz »

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 !
Post Reply