On 8/7/11 5:12 PM, J. Landman Gay wrote:
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:p...@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.


Just to clariy: I tried inserting the "www" alias into the path, since virtually all servers support that. It works with primary domains but it fails with subdomains. Basically I'm looking for a way to force ftp to resolve the "www.domain" part of the URL to an absolute path. My tests so far seem to indicate that any initial "www" in the path is ignored with ftp.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to