<pre><?
include 'adv-samba.php';
$samba = new adv_samba;
$samba->target= '192.168.1.105';
$samba->connect ();
echo " SAMBA Shares on target ".$samba->target." :<Br>";
foreach ($samba->targets[$samba->target][shares] as $share)
{
echo "$share[name]<br>";
$sharenames[]=$share[name];
} // foreach
echo "<hr>";
echo " SAMBA remote DIR command on each share:<br>";
foreach ($sharenames as $sharename)
{
$samba->sharename = $sharename;
// $samba->sharerecurse ='recurse;'; // uncomment to recursive samba listing directory, not each samba version support it.
$samba->connect();
echo "$sharename<br>".implode("\r\n",$samba->line).'<br>';
}
echo "<hr>";
//print_R ($samba);
?>
|