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:[EMAIL PROTECTED]/path/to/secret/file.txt');

This is standard web syntax - e.g. it will work in a web browser, wget,
curl, etc.

Col.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to