BetaArchive Logo
Navigation Home Screenshots Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 25d, 22h, 34m | CPU: 72% | MEM: 5626MB of 12227MB used
{The community for beta collectors}

Forum rules


Any off topic discussions should go in this forum. Post count is not increased by posting here.
FTP Access status is required to post in this forum. Find out how to get it


Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 
Author Message
 PostPost subject: Read-only FTP client!        Posted: Fri Mar 21, 2008 3:35 pm 
FTP Access
Offline

Joined
Tue Oct 23, 2007 11:21 pm

Posts
595
Well, I made an read-only FTP client, completely written in PHP. Take your opinnion!

Tested with: Abyss X1 2.5, PHP 5.2.5, Windows XP Professional.
And also: IIS 5.0, PHP 5.2.5, Windows 2000 Professional SP4 - Will not work, listing always fails.

Featuring:
- Completely output-buffered, on-the-fly list population
- Progress bar
- Filesize (blank if not supported by server/entry is a directory)
- Link for download managers

Known problems:
- I can't determine if progress is >10, then the progress bar goes back to 0 when real progress is 10.
- Single-purpose connections, warning with anti-hammers!

Code:
Had problems with BBCode, then a phps is available:
http://www.mephost.com/~richard/betaarc ... aster.phps


Last edited by RichardG867 on Fri Mar 21, 2008 5:10 pm, edited 4 times in total.

Top  Profile
 PostPost subject:        Posted: Fri Mar 21, 2008 4:04 pm 
FTP Access
Offline

Joined
Fri Dec 28, 2007 9:27 am

Posts
63
Could be better if u allow the user to change the port, since some sites has an own port for FTP downloading...


:D


Top  Profile
 PostPost subject:        Posted: Fri Mar 21, 2008 4:07 pm 
FTP Access
Offline

Joined
Tue Oct 23, 2007 11:21 pm

Posts
595
The script is designed to hold one host/port/login/pass per copy.

If you want to change the FTP port, look at $port.


Top  Profile
 PostPost subject:        Posted: Fri Mar 21, 2008 4:18 pm 
Staff
User avatar
Offline

Joined
Wed Apr 11, 2007 2:11 pm

Posts
2607

Location
Germany, Earth

Favourite OS
Windows 10
:D very nice, thanks for this

_________________
MS vNext: Windows 10 ESD Database - Windows 10 Build Labs - Windows 10 Update Archive - Office 2016 Version Tracker - Office Downloader


Top  Profile  WWW
 PostPost subject:        Posted: Fri Mar 21, 2008 4:22 pm 
Staff
User avatar
Offline

Joined
Wed Apr 11, 2007 2:11 pm

Posts
2607

Location
Germany, Earth

Favourite OS
Windows 10
:o I cant open directories and the link does not wor for me

_________________
MS vNext: Windows 10 ESD Database - Windows 10 Build Labs - Windows 10 Update Archive - Office 2016 Version Tracker - Office Downloader


Top  Profile  WWW
 PostPost subject:        Posted: Fri Mar 21, 2008 4:29 pm 
FTP Access
Offline

Joined
Tue Oct 23, 2007 11:21 pm

Posts
595
More details, please.

The .phps link is working properly here.


Top  Profile
 PostPost subject:        Posted: Fri Mar 21, 2008 4:35 pm 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12460

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
The link works for me just fine.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Fri Mar 21, 2008 4:38 pm 
FTP Access
Offline

Joined
Tue Oct 23, 2007 11:21 pm

Posts
595
Well, I tried to use CODE, but the code gets screwed up:

Code:
</title> $file) {
$size = ftp_size($conn,$goto."/".$file);
if ($size = "-1") {
$size = "";
} else {
$size = $size." bytes";
}
echo "<tr><td><a>".$file."</a></td><td>".$size."</td><td><a>Link</a></td></tr>";
$perc = ($num / count($files)) * 100;
$split = @str_split($perc,strlen($perc) - 12);
$perc = str_replace(".","",$split[0]);
echo "<script>document.getElementById('progress').width='".$perc."%';</script>";
ob_flush();
}
echo "</table><script>document.getElementById('progress').width='100%';</script></body></html>";
ob_end_flush();
?>


Top  Profile
 PostPost subject:        Posted: Fri Mar 21, 2008 4:54 pm 
Staff
User avatar
Offline

Joined
Wed Apr 11, 2007 2:11 pm

Posts
2607

Location
Germany, Earth

Favourite OS
Windows 10
Well, on the / directory everything works fine, but when I navigate to a subdirectory, for example /httpdocs, and then click on a file I get:

Quote:
Directory listing error. Are you trying to list a file?


and when I click on link, I get a 550 error, No such file or dir.

_________________
MS vNext: Windows 10 ESD Database - Windows 10 Build Labs - Windows 10 Update Archive - Office 2016 Version Tracker - Office Downloader


Top  Profile  WWW
 PostPost subject:        Posted: Fri Mar 21, 2008 4:58 pm 
Staff
User avatar
Offline

Joined
Wed Apr 11, 2007 2:11 pm

Posts
2607

Location
Germany, Earth

Favourite OS
Windows 10
It seems that the script duplicates a part of the URL, when I am in /URLA and try to open the folder URLB (/URLA/URLB) the script tries to open /URLA/URLA/URLB :S

_________________
MS vNext: Windows 10 ESD Database - Windows 10 Build Labs - Windows 10 Update Archive - Office 2016 Version Tracker - Office Downloader


Top  Profile  WWW
 PostPost subject:        Posted: Fri Mar 21, 2008 5:14 pm 
FTP Access
Offline

Joined
Tue Oct 23, 2007 11:21 pm

Posts
595
What server are you using, and what PHP version and OS?

I got the same quirk with Windows 2000 SP4 Professional + IIS 5.0 + PHP 5.2.5 ISAPI (the duplicate one).

EDIT: WAIT, are you trying to click on a file? This is why "Link" exists.

EDIT: Re-check the PHPS, today's last version. Uses statusbar for progress too, and filesize check is done after listing.


Top  Profile
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2018

 

Sitemap | XML | RSS