Reply to Re: [PHP] FOPEN

Your name:

Reply:


Posted by Richard Lynch on 02/17/05 20:23

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация