Parse FTP url

M

MarkusJNZ

Hi all, does anyone know how I can parse an ftp url to retrieve the
server, login and password?

e.g. given a ftp url like

ftp://ftplogin:[email protected]

I can get out the following info

server = subdomain.domain.com
password = mypass
login = ftplogin

I can successfully get the url etc by doing string parsing etc but I
would like a better way which is not open to interpretation.

e.g. Someone might have a @ or a : in their password then the string
parsing may run into problems.

TIA
Markus

=================================
jhgklioplsjdujehhrejhjrejhekdsdlkasdlerksdksd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top