Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

How would I be able to determine if there's a certain folder or file in another computer? I want to get an external site for my personal use, so if I'm somewhere else (other than my localhost), I would like to go online and search a file from home computer.

Do I need to install something? Or can I work around having a cookie set up in my computer ?

Does this make sense?

Thank you

share|improve this question
Its not clear here if you mean your intention is to do this in code, or if you are just looking for a solution. Running an FTP server on your home PC would let you access the files. This may be better suited for SuperUser. – GrandmasterB May 22 '12 at 17:23
Not looking for a code, I'm just looking for a right direction. Say I have a server at home and its hosting a website. Can I go to another computer (say a work computer) and access my website and search folders (that are on my work computer) kind of like the computer's search? – andrewliu May 22 '12 at 18:50
This doesnt sound like its on-topic for this site, then. This site is for questions about programming, not general computer usage. Plus program recommendations are generally off topic anyways. There's TONS of applications out there that let you do what you are looking to do (ftp servers, gotomypc, vnc, etc), not to mention simply setting up a VPN. – GrandmasterB May 22 '12 at 19:37
When you say "another computer" do you mean "another computer to the one PHP is running on" or "another computer to the one I'm currently using"? I think you want to use PHP to search its own computer, and to connect to that remotely. Am I right? Please edit your question to clarify. – TRiG Nov 22 '12 at 18:32
This is off-topic based on our FAQ. Perhaps you could browse the other Stack Exchange sites to see if there's one that seems to be a better fit. If you aren't sure, consider asking on the site's Meta or in their chat room. – Thomas Owens Nov 22 '12 at 19:17

closed as off topic by Thomas Owens Nov 22 '12 at 19:16

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

I'm not sure what exactly do you need. For example how important is security or where files are located.

If security is not very important then you can just put folder under your website root with list permissions then you can list content of your folder on any web browser. You can make folder pass protected to restrict access but it will not be very secure but it has advantage that you will not need to open any additional ports.

You can set up FTP server or use SSH client to achieve the same effect. There is a lot of different solutions available.

share|improve this answer

You can use PHP to see if a file or folder exists on the server. You would use the following functions file_exists and is_dir . A sample code snippet is here

<?php
$filename = '/pathto/file.php';

if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?> 

This is not the same as searching for a file. BTW this is bad idea to be available to public. If you want to do it, make sure no link exists to this page.

Another solution would be to use a software like TeamViewer which allows you to login into your remote computer and have full access to it. It is free for individual use. Hope it helps.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.