Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto login - htaccess

Status
Not open for further replies.

tweenerz

Programmer
Mar 25, 2002
202
US
Is there a way to send htaccess login info to an htaccess protected page, thus bypassing the popup dialog box? Like through the authentication header, or something?

I'm not trying to hack, I just want to automatically login through a hard coded username and password.

I am going to use a cron script to access the page, so there wont be anybody there to physically log in.

p.s. The cron script and the htaccess dir are on two separate servers.

Is this possible?
 
Yes. Read up on CURL, that's the most reasonable tool to fetch the remote content.
 
You can use CURL as ericbrunson says, or just construct your own HTTP requests using fsockopen(). A third alternative is to use the PEAR HTTP classes which also have basic authentication.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top