Are you asking, given the string
ftp://ftp.asptoday/downloads/supportfiles/articles023.zip
how do you find the port and domain name?
Well, you'd have to parse the string. ftp.asptoday would be your domain,
though that doesn't appear to be a valid domain name.
The port is the default FTP port which is TCP port 21. If the port were
different, the string would be something like:
ftp://ftp.asptoday:551/downloads/supportfiles/articles023.zip
In this case, the 551 would be your port number (following the :)
So, again, you simply parse the string and see if there's a port number.
I believe there are APIs for breaking up a URL into its individual pieces,
but I can't think of it off the top of my head.
Pete
--
http://www.petedavis.net
Post by Jack WrightDear all,
I want to extract Domain Name and Port from FTP address, is there
any API available?
for eg. ftp://ftp.asptoday/downloads/supportfiles/articles023.zip
Thanks & Regards,
Jack