Hi,
I want to connect to a computer in my network, where the computer is password protected.
So what we normally do is, type \<ip or computer name>. Then when it prompts for username and pass, we provide it in the pop-up window.
So, when we do a opendir('directory name'), it opens normally. but what to do if this ddirectory has some pass.
Please help. This is really urgent and I am stuck up.
My Code is
<?php
function open_dir ($dir_name)
{
if ($handle = opendir ($dir_name))
{
while (($file = readdir($handle)) != false)
{
if ($file != '.' && $file != '..')
if (filetype($dir_name.'/'.$file)== 'dir')
{
open_dir ($dir_name.'/'.$file);
}
else
{
echo $file." ";
echo "-------------";
insert_into_database ($dir_name, $file);
}
}
closedir($handle);
}
}
open_dir ("\\\\192.168.1.2\folder");
?>
What to do if "\\192.168.1.2\" computer in the network has password