Converting HTTP to FTP URL

J. Landman Gay jacque at hyperactivesw.com
Sun Aug 7 18:12:00 EDT 2011


I need a way to convert a web URL to a valid FTP URL. For example, 
convert this:

   http://www.domain.com/folder/file.txt

to this:

   ftp://user:pass@domain.com/webroot/folder/file.txt

Not all servers use "public_html" so I can't just hard-code that as the 
web root. Is there a generic way to indicate the web folder on a server, 
the same way a tilde indicates the user's home folder? Or any other way 
to get the path?

The user name and password are known.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the Use-livecode mailing list