Hello R users,

I am trying to read files from a website that requires authentication.
 I have been working with url() to to open a connection in Windows.

For example:

setInternet2(TRUE)
con <- 
url(description="http://myusername:mypassw...@www.somesite.com/myfile.txt";,
open="r")
open(con)
read.table(con, sep="\t")

This works like a charm.  My question is does this work across
platforms, or only on Windows?  The reason I ask is this quote form
the ?url documentation

     Note that 'https://' connections are only supported if
     '--internet2' or 'setInternet2(TRUE)' was used (to make use of
     Internet Explorer internals), and then only if the certificate is
     considered to be valid.  With that option only, the
     'http://user:p...@site' notation for sites requiring
     authentication is also accepted.

I am sending some scripts to people who use Mac OS X, and (I am
assuming) they will not have Internet Explorer installed.  If it does
not work, is there a more general way?  At least for now, the website
is not using encryption (regular http) and is using basic
authentication controlled via .htaccess and .htpasswd files.

Thanks,

Josh


--
Joshua Wiley
Senior in Psychology
University of California, Riverside
http://www.joshuawiley.com/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to