Hi All, I am trying to connect to a Network drive remotely using authentication data(\drive_name)(T:). I will need to upload and download documents. If possible can you give me some pointers.

If you require any additional information please let me know

Thanks in advance

David

Sorry the drive name I am trying to connect to is data(\drive_name)(T:).it looked confusing

thanks
David

you can upload file without using the drive name..
note that
Source ->>(should have already an access)->> Destination
then you could access it the destination like:

$config['upload_path'] = '\\ipaddressOrName\sharedpath';

Hi Thank you both for your reponses

A remote user will be required to log on to a network drive and access documents which can be downloaded and other documents uploaded.

The PHP is to check login credentials and allow access.

Thanks

David

Hi All, I have looked around and tried the following code. Am I on the correct path with this type of code, to access a server?

What I have tried does not work, any advice?

I have been researching here http://uk3.php.net/function.opendir

Thanks in advance
David

<?php
$dir = "\\wat-sql-42_sp\Watkins Reports";

// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
            echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
        }
        closedir($dh);
    }
}
?>

Hi All as anyone got any questions? Have I made everything clear? Does any have any ideas? do you need additional information?

Thanks

David

The open_dir and related functions are for working with a local filesystem. To access something on a remote server, you're better off looking into an FTP connection to achieve the results you're looking for. See documentation here:

http://www.php.net/manual/en/book.ftp.php

Hi Lsmjudoka, thanks for your reply and for my late reply, other things have taken over.

I will look at you link contents and see where I get to on this.

Thanks

David

Hi Lsmjudoka, Thanks for the info got me started. I will mark insolved and start a new thread for my new questions.

thanks

David

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.