add class KerberosApacheAuth and example code

This commit is contained in:
C1-10P 2018-07-20 17:59:03 +02:00 committed by Robin Appelman
commit e8df1df9a2
3 changed files with 113 additions and 46 deletions

View file

@ -0,0 +1,19 @@
<?php
require('vendor/autoload.php');
// dfs paths not working
$host = 'dc.domain.local';
$share = 'netlogon';
$auth = new \Icewind\SMB\KerberosApacheAuth();
$serverFactory = new \Icewind\SMB\ServerFactory();
$server = $serverFactory->createServer($host, $auth);
$share = $server->getShare($share);
$files = $share->dir('/');
foreach ($files as $file) {
echo $file->getName() . "\n";
}