Re: FOPEN

From: Date: Thu, 17 Feb 2005 18:23:41 +0000
Subject: Re: FOPEN
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-208943@lists.php.net to get a copy of this message
Diana Castillo wrote: > How can I read the contents of a web page that uses basic > authentication? > I want to use fopen() but dont know how to do this and also send the > username and password You may be able to do embed the username/password in your URL: $file = fopen("http://username:password@example.com") or die("Could not open remote page"); You may want to actually store the username/password in a different file, and try to make it slightly less easy to read/find that file to avoid exposing passwords, the same way you would do with MySQL username/password. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#208943) next »