On Tue, February 6, 2007 7:53 am, Colin Guthrie wrote: > Steven Macintyre wrote: >> Hiya, >> >> I need to be able to read a file into a string - I have used the >> above >> command and it works ... now ... I need to read a file into a string >> - that >> requires a username and password to access the authentication is >> normal HTTP >> basic realm >> >> Any ideas? > > $var = > file_get_contents('http://username:password@xxxxxxxxxxxxxxx/path/to/secret/file.txt'); > > This is standard web syntax - e.g. it will work in a web browser, > wget, > curl, etc. Actually, IE is dropping (has dropped?) support for the username:password part because their users are too dumb to chop out their password before posting their URL or something... I found this in some KB article somewhere, I think... They didn't actually express it as user stupidity, mind you. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php