Jump to content

Check Local Computer Script


refiking

Recommended Posts

Can someone point me in the right direction or tell me if it's at least possible.  What I am trying to do is create a script that searches the local computer of the user and if a filename is there, it will upload it to the mysql database.  Then, another script that searches for a filename on the database and if it's there, to ask the user if they would like to send it to their local computer.  Any suggestions?

Link to comment
Share on other sites

A remote PHP server does not have access to your local file system, so you can't search local computer for a given file name. Think about the "security risk" it would pose if you could get you computer scanned by going to a random website...

Link to comment
Share on other sites

It's not the entire computer.  Just one directory and it's for my own business.  The local computers being searched or all mine.  There's no security breach if it's my own computer.  And what about those programs that scan for ads and viruses. If they can scan for viruses, etc.  Then, why can't I search a file directory?

Link to comment
Share on other sites

It's just a fact that PHP running on a remote server can't access files on your local computer...

 

Have you for example ever included a script located on your local computer (e.g. C:\Scripts\PHP\script.php) in a script run on a remote server?

 

Have you ever opened files for reading or wrinting which are located on your local computer from a script run on a remote server?

 

Of course it can be useful - I've just used PHP to rename a lot of images because I couldn't find any batch renaming program which did what I wanted. But to do stuff like that (access local files) you have to run PHP on your local computer - install Apache and PHP on your local computer and your are in business :)

Link to comment
Share on other sites

If it's for your own business, which is has to be for this to work, you could setup a FTP server on your local computer and make the directory in question available to PHP on what ever server you are running your scripts.

 

Alternatively, as I said earlier, you can install a webserver (apache preferably) and PHP. Have a look at XAMPP if you are in a hurry: http://www.apachefriends.org/en/xampp.html

Link to comment
Share on other sites

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.