Re: http authentication and php

From: Date: Sun, 23 Sep 2001 07:03:27 +0000
Subject: Re: http authentication and php
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-68403@lists.php.net to get a copy of this message
Well the actual problem is that this file is behind a http authenticated directory. I actually don't want the users to know the login and password for it since it is the login for my control panel for my website. However, I do want to be able to execute a url, this is to allow users to create their own email addresses with pop access without requesting them from me all the time. I am just not sure if I can push the login and password for the authentication window that would normally pop up, so the file is executed behind the scenes, and the user would merely see a output of their username and password and information on how to login to their account which would be output as long as the file was able to be executed. Any ideas? "Evan Nemerson" <evan@coeus-group.com> wrote in message news:01092223410903.02101@localhost.localdomain... > if you just want to output the file to the user, > readfile("http://server.com/greendocks/locked/useradd.htm?user=blah&pass=bla h"); > should work. If you want to play with the file first, file() will put it in > an array, fopen() will create a file pointer to it, you could create your > very own HTTP session (if you know the protocol) with fsockopen()... i'm sure > there are more, but that's all you need (probably). I would probably use this: > > $file=implode("\n",file("http://server.com/greendocks/locked/useradd.htm?use r=blah&pass=blah")); > > if i wanted to place the whole thing in one variable, not an array. > > > > On Saturday 22 September 2001 20:39, you wrote: > > I am trying to write a php script that will work around a http > > authentication that I do have access to. I am trying to do this so that a > > form process in my control panel can automatically have information sent to > > it from a form that a user will fill out. However, my problem is in trying > > to get PHP to automatically authenticate. > > > > > > for example: I want to be able to call a url like this: > > > > http://server.com/greendocks/locked/useradd.htm?user=blah&pass=blah but > > this url is behind a http authentication. Is it possible to have this url > > called by a php script? > > > > And the second part of the question is can I do this process so it is > > completely invisible to the user that this page has been called? Because of > > course I don't want to allow users to have access to everything in my > > control panel. > > > > Hopefully someone knows what I'm getting at. Thanks for any help you may be > > able to provide. > > > > Jeff

« previous php.general (#68403) next »