Jump to content

Recommended Posts

Hi guys

 

I tryed to search on the internet but I didn't found.

I need to do a table with all folder in a certain path and give the last modified file of the folder.

 

My application is on a linux server. If my wanted path is on the same server thats ok everything works fine

 

but The wanted path will be on a windows data server.

 

I can acces it by making a hyperlink to it

e.g.: <a href='file:\\\serverName\\folder\\an other folder\\file.txt'>file.txt</a>

 

but if I try to see if the file exist

e.g.:

if(is_dir("\\serverName\folder")){

      echo "exist";

    }else{

      echo "don't exist";

    }

 

I even try this

 

    if(file_exists('file:\\\serverName\\folder')){

      echo "exist";

    }else{

      echo "don't exist";

    }

 

 

it said that the directory didn't exist

 

any help??

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/145797-file-exist-on-data-server/
Share on other sites

Like I said, I have never done this. Chances are it is not port 80. You have to find out what port windows file server uses. I have no clue which port that is.

 

PHP Networking may also have some more insight.

 

Port 80 is used by web servers so I bet it does not work cause that file server is probably not running Apache to dish out the files.

 

EDIT:

And to be honest, I do not even know if this is possible. You "may" want to setup an FTP server to access those files, but that opens a whole nother can of worms. And the above would only work if the Windows Box is on your local network if it would even work.

 

If they are not on an internal network with each other, FTP would be the only way to go about this. Unless you can figure out how to get this to work on an internal network, then VPN would be an option as well.

 

ok and is it possible to do a little script that my php page will call and that will be running on the pc of the user who's visiting my page.

the script will verify if the file exist and will populate my table??

 

after my hyperlink will work with the file the script found.

ok and is it possible to do a little script that my php page will call and that will be running on the pc of the user who's visiting my page.

the script will verify if the file exist and will populate my table??

 

after my hyperlink will work with the file the script found.

 

Dude, this sounds like border line hacking. IE or FF isn't going to let activex controls or whatever run scripts on someone's PC...what are you trying to do exactly?

 

Your original post was about checking file exists, and now you want to run scripts on someone's PC?

 

Dude, this sounds like border line hacking. IE or FF isn't going to let activex controls or whatever run scripts on someone's PC...what are you trying to do exactly?

 

Your original post was about checking file exists, and now you want to run scripts on someone's PC?

 

 

They will allow it to run on their pc if the end user let's it. Simple as that, if it really is legit, people will know to allow it and the source is trusted. If not they will just deny the Activex controls.

Dude, this sounds like border line hacking. IE or FF isn't going to let activex controls or whatever run scripts on someone's PC...what are you trying to do exactly?

 

Your original post was about checking file exists, and now you want to run scripts on someone's PC?

 

 

They will allow it to run on their pc if the end user let's it. Simple as that, if it really is legit, people will know to allow it and the source is trusted. If not they will just deny the Activex controls.

 

Oh sure, if it's legit. You know the average mom or dad sitting at a website will get the pop up and probably just hit OK...

 

I just hope this guys question is legit that's all, he's jumping around with what things to do...

 

 

Oh sure, if it's legit. You know the average mom or dad sitting at a website will get the pop up and probably just hit OK...

 

Anyone can learn ActiveX, sadly enough. As arrogant as it sounds, if person A is dumb enough to install something without knowing what it is, I have no mercy for them. This is why I setup my parents computers and I train them on how to properly use it.

 

Mainly because I hate cleaning up on spyware. Now anytime something pops up to install they call me up and ask me if it is ok. I know not everyone has that, and it is just me being arrogant. But if you do not want to get taken advantage of on the computer/internet you have to put forth some effort and learn how to use it properly.

 

90% of people are too lazy to take that time to ask someone, hire someone or to even pay attention on how to.

 

As far as this being a "hacking" attempt, could be. It could be legit that he is on an intranet and just wants to allow people access. Either way, if he is dumb enough to try this as a "hacking" attempt, let him try and fail. If he wants to put forth the effort to make an ActiveX control just to try and "hack" people, well more power to him. Just when he gets caught, which chances are pretty high as he seems to not know the first items of how to do any of this, at least then he is fined/behind bars.

 

It is the ultimately the end-user's responsibility to educate themselves and protect themselves. His "hacking ploy" will only work if they explicitly allow it.

 

(end rant).

 

Oh sure, if it's legit. You know the average mom or dad sitting at a website will get the pop up and probably just hit OK...

 

 

 

90% of people are too lazy to take that time to ask someone, hire someone or to even pay attention on how to.

 

 

 

 

 

 

That is absolutely DEAD ON. I have used WinXP forever without getting viruses or spyware just because I am not oblivious to websites that I go to. of course I can be tricked too but i am very careful.

 

When people ask me for help because their PC has SLOWED down, I already know that it's NOT the PC but it's the END USERS!

 

Knowledge is power and no one these days want to better themselves and learn how to surf the internet properly, it's too easy to just say OK, and then load spyware on their PC....

 

I don't even bother to clean out their systems as it's a waste of time. I just copy their important data to an external HDD and just blow out their PC.....

 

 

wow guys

 

I'm not trying to hack anybody I need this application for my job. My boss ask me to do this.

 

I want to use the user pc just to logging a server if he have the right to. If not a message will show saying that he can have access to those file. So do I.

 

the only reason he's because if my folder path is on the same server that ok my application read them. But if they are on a different server. The application don't make the link. I just want to know if there's a way to make that link.

 

I also try to logging to my own computer file and he don't reconize them.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.