forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


ftp question

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Jan 31, 2004 6:24 am    Post subject: ftp question Reply with quote

i was thinking of making a program that coonects to a ftp server so people can d/l and upload programs. is there any examples around that i can look at?

i'am not sure how to make it so people can upload files and see the files on the server to d/l Sad

i thought i read some where it depends on the ftp server s/w so there might be problems or something.....


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Sat Jan 31, 2004 11:40 am    Post subject: Reply with quote

You might have a look at one of the example scripts of the vdsipp.dll... there is a ftp-client example included Smile

Regards,
Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Jan 31, 2004 11:59 am    Post subject: Reply with quote

you can take a look at the ftp example that comes with VDS 5.
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Jan 31, 2004 4:46 pm    Post subject: Reply with quote

ok thanks guys


but what was that i hearing about the ftp server s/w and how something might not work right.....hummmm

i will have to see if i can find that post (its old)

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jan 31, 2004 5:51 pm    Post subject: Reply with quote

I think you mean how on some servers the directory listing format is
different. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Jan 31, 2004 6:38 pm    Post subject: Reply with quote

humm i think that whats it....can you explain more about that please Smile


what do i have to do to fix that problem??

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sat Jan 31, 2004 9:18 pm    Post subject: Reply with quote

Depending on the type of ftp server the output of the file listing is different. Depending on the type of ftp server you will get multiple different formats returned to you. This is the reason many ftp programs like CuteFtp, WS Ftp, etc. allow you to choose from a list what type of Ftp server it is - so they can show you the file listings correctly.

The only proper way to account for this is to replicate what cuteftp, wsftp and others are doing by finding the appropriate file listing format and having your program deal with it.

Thankfully many ftp servers use a very similar format but there are a few ftp servers which like to use their own. For instance you may get one ftp server that lists the files like this:

FILE TYPE| FILE NAME | SIZE | PERMISSIONS | DATE

and another may list each file like:

FILE TYPE | FILE NAME | PEMISSIONS | SIZE | DATE

where it moves the field type around, some may start by giving the the permissions first and then the type of file, or some may not even tell you the type of file it is (directory, link, file).

You noted 'what you can do to fix the problem', it's not a really a problem but an issue that requires more work to account for the many file listing formats available.
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Jan 31, 2004 10:54 pm    Post subject: Reply with quote

ok i think i follow you but:

Quote:

FILE TYPE| FILE NAME | SIZE | PERMISSIONS | DATE

and another may list each file like:

FILE TYPE | FILE NAME | PEMISSIONS | SIZE | DATE


how do i know what type? or are they only these 2 in uses?

i hope you follow what i mean

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sat Jan 31, 2004 11:03 pm    Post subject: Reply with quote

You can give the user the option to choose what type of filelisting it has. Take a look at your ftp program and you'll see they give you the option as well. No there are not just these 2 types, there are well over 30 different formats.
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 12:11 am    Post subject: ok Reply with quote

i found where it lets you selected what type BUT i don't see what commands its using for the diff types...


if ya follow what i mean

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 2:36 am    Post subject: well Reply with quote

well i can connected to the ftp server BUT it don't show the files or folders in the "site" window Sad

the example i'am using is vdsipp03 the ftp example.dsc

any tips would be great

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sun Feb 01, 2004 4:40 am    Post subject: Reply with quote

Make sure the ftp server you are connecting to is FTP and not TFTP there is a difference. The list on the right after connecting should show something if the server/client logged in correctly. Make sure you are using the right user/pass and that you have permission to view directories. If you're logging in as anonymous it may not let you view files/dirs.
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 7:27 am    Post subject: Reply with quote

yea i found the problem i did a type oooo


i think i got it working


thanks for your help

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Feb 01, 2004 10:06 am    Post subject: Reply with quote

PGWARE wrote:
Thankfully many ftp servers use a very similar format but there are a few ftp servers which like to use their own. For instance you may get one ftp server that lists the files like this:

FILE TYPE| FILE NAME | SIZE | PERMISSIONS | DATE

and another may list each file like:

FILE TYPE | FILE NAME | PEMISSIONS | SIZE | DATE


Maybe you could check each item for its value. If the third one (SIZE or PERMISSIONS) has a dot in it, it is a size. If it's length is 3, I think it always is a permission?

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sun Feb 01, 2004 5:15 pm    Post subject: Reply with quote

Permissions do not necessarily have to be numerical. They can also be listed like: rxwxxxr etc. Also most file sizes reported from ftp servers are in bytes thus no period will be in the file size.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group