| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Jan 31, 2004 6:24 am Post subject: ftp question |
|
|
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
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  |
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Sat Jan 31, 2004 11:40 am Post subject: |
|
|
You might have a look at one of the example scripts of the vdsipp.dll... there is a ftp-client example included
Regards,
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Jan 31, 2004 11:59 am Post subject: |
|
|
you can take a look at the ftp example that comes with VDS 5. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Jan 31, 2004 4:46 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jan 31, 2004 5:51 pm Post subject: |
|
|
I think you mean how on some servers the directory listing format is
different.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Jan 31, 2004 6:38 pm Post subject: |
|
|
humm i think that whats it....can you explain more about that please
what do i have to do to fix that problem??
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sat Jan 31, 2004 9:18 pm Post subject: |
|
|
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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sat Jan 31, 2004 10:54 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sat Jan 31, 2004 11:03 pm Post subject: |
|
|
| 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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 12:11 am Post subject: ok |
|
|
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  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 2:36 am Post subject: well |
|
|
well i can connected to the ftp server BUT it don't show the files or folders in the "site" window
the example i'am using is vdsipp03 the ftp example.dsc
any tips would be great
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sun Feb 01, 2004 4:40 am Post subject: |
|
|
| 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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 7:27 am Post subject: |
|
|
yea i found the problem i did a type oooo
i think i got it working
thanks for your help _________________ Have a nice day  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Feb 01, 2004 10:06 am Post subject: |
|
|
| 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 |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sun Feb 01, 2004 5:15 pm Post subject: |
|
|
| 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 |
|
 |
|