Re: file_get_contents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Col.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux