Go Back   FlashFXP Forums > > > >

ioFTPD General New releases, comments, questions regarding the latest version of ioFTPD.

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-04-2004, 09:01 AM   #16
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

Simple vfs listing looks following:

Code:
	# Open userfile
	$uhandle = io_user_open(0);

	# Open mount table
	$mtable = io_mtable_open('d:\\ioFTPD\\etc\\default.vfs');

	# Resolve root path
	$path = io_mtable_query($mtable, '/', $uhandle, 1);
	$c_path = count($path);

	if ($c_path > 1) {
		# Show mounts under current path
		$link = io_mtable_query_mounts($mtable, $path[0]);
		if ($link) {
			$c_link = count($link);
			for ($i=0;$i<$c_link;$i+=2) {
				# Open file vfs attributes
				$file = io_fs_open($link[$i+1]);

				# Test access
				if ($file && io_fs_access($file, $uhandle)) {
					$finfo = io_fs_query($file);
					echo "$finfo[0]:$finfo[1] $link[$i]<br>";
				}
				io_fs_close($file);
			}
		}

		# Go through result path array
		for ($i=1;$i<$c_path;$i++) {
			$hfind = io_fs_find_first($path[$i]);
			# Show files
			if ($hfind) {
				do {
					if (io_fs_access($hfind, $uhandle)) {
						$finfo = io_fs_query($hfind);
						$fname = io_fs_query_filename($hfind);
						echo "$finfo[0]:$finfo[1] $fname<br>";
					}

				} while (io_fs_find_next($hfind));
				io_find_close($hfind);
			}
		}
	} else {
		echo "Could not access requested directory<br>";
	}
	

	io_mtable_close($mtable);
	io_user_close($uhandle);
darkone is offline   Reply With Quote
Old 02-04-2004, 06:11 PM   #17
wooolF[RM]
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 411
Default

seems understandable and logical nice :banana:
wooolF[RM] is offline   Reply With Quote
Old 02-04-2004, 11:18 PM   #18
NorLan
Senior Member
 
Join Date: Sep 2003
Posts: 110
Default

first time i see #explanations in d1s code -- very nice
NorLan is offline   Reply With Quote
Old 02-05-2004, 01:15 AM   #19
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

Quote:
Originally posted by NorLan
first time i see #explanations in d1s code -- very nice
Those last 2 examples are php, pretty well self explanitory.
neoxed is offline   Reply With Quote
Old 02-05-2004, 05:15 AM   #20
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

Who list
Attached Images
File Type: jpg who.jpg (156.3 KB, 187 views)
darkone is offline   Reply With Quote
Old 02-05-2004, 05:16 AM   #21
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

Directory list seems fast enough
Attached Images
File Type: jpg list.jpg (142.1 KB, 179 views)
darkone is offline   Reply With Quote
Old 02-05-2004, 05:27 AM   #22
toki
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 221
Default

jam jam...
toki is offline   Reply With Quote
Old 02-06-2004, 05:16 AM   #23
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

One of the important additions to php command set is:

Code:
<? php
	header('Content-type: text/plain');
	header('Content-Disposition: attachment; filename="ioFTPD-beta5-6-3u.zip"');
	io_attachment('d:\\ioFTPD-beta5-6-3u.zip');
?>

io_attachment() does same as readfile(), but has much better performance. io_attachment() tells ioftpd to read file outside the php interpreter.

Following is also possible:
Code:
<? php
	io_attachment('d:\\ioFTPD-beta5-6-3u.zip');
	echo "foo";
	io_attachment('d:\\ioFTPD-beta5-6-3u.zip');
	echo "foo";
?>
darkone is offline   Reply With Quote
Old 02-06-2004, 07:04 AM   #24
wooolF[RM]
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 411
Default

seems like I will like that httpd even more then I've thought of it before
wooolF[RM] is offline   Reply With Quote
Old 02-06-2004, 07:44 AM   #25
bounty
Senior Member
ioFTPD Scripter
 
Join Date: Aug 2002
Posts: 529
Default

ehehehe i think it's time for me to learn PHP

this looks great D1

thx for this fine piece of software

have fun
bounty
bounty is offline   Reply With Quote
Reply

Tags
add, commands, file, handler, php

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:09 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)