Re: Directions on designing an upload/download (with password) protected system

From: Date: Sat, 02 Dec 2000 22:07:40 +0000
Subject: Re: Directions on designing an upload/download (with password) protected system
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28394@lists.php.net to get a copy of this message
On Sat, 2 Dec 2000, Nando2 wrote: > Ignacio, > > That would be OK. Do you have an full example on how to do it with MySQL? > > regards, > > C.F. > Full and specific? No. Here's a partial generic implementation I whipped up. Files are stored as base64_encode()d date in largetext fields, allowing for up to 3GB per file. Users are stored in users table (duh) with the passwords preferably in MD5-hashed format. User IDs are meant to be swung around, not usernames. You can have either *nix-like ugo permissions or WinNT- / OS/2-style ACL permissions depending on which files-* table you base your structure(s) on. The files-nested-* allows for more than 4.29something billion files on your filesystem by storing each directory as a separate table. A sample SQL statement is also given to show how read permissions can be determined in a filesystem of type flat-ugo. Nested and ACL equivalents are left as an exercise for the reader ;) Also, none of the syntax in the file is guaranteed to be correct, or even possible :) -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#28394) next »