Won't sending a 401 header do the trick?
?php
header(WWW-Authenticate: Basic realm='my realm');
header(HTTP/1.0 401 Unauthorized);
?
Not sure, but worth a try.
Cheers
Jon
-Original Message-
From: Boris [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 13:08
To: [EMAIL PROTECTED]
On Thursday 23 August 2001 02:36, Casteele/ShadowLord wrote:
Andy [EMAIL PROTECTED] wrote in article
See if is there some kind of echo before header()s, or HTML sent to
browser.
No, I've been extremely careful to avoid that. The following are the
two test files I've been using to try
See if is there some kind of echo before header()s, or HTML sent to
browser.
You cannot do this
html
head
Bla bla
?php header(Location : any_script.php\n\n);?
/head
body
/body
/html
Why? Because there is already content sent to the browser. If some code
uses
header() place
Andy [EMAIL PROTECTED] wrote in article
003b01c12b23$d1f245d0$0b01a8c0@ANDreY...
See if is there some kind of echo before header()s, or HTML sent to
browser.
No, I've been extremely careful to avoid that. The following are the two
test files I've been using to try to solve this.. (sans
On Thu, 23 Aug 2001 10:06, Casteele/ShadowLord wrote:
Andy [EMAIL PROTECTED] wrote in article
003b01c12b23$d1f245d0$0b01a8c0@ANDreY...
See if is there some kind of echo before header()s, or HTML sent to
browser.
No, I've been extremely careful to avoid that. The following are the
two
To: Ben Bleything; [EMAIL PROTECTED]
Subject: RE: [PHP] HTTP header question.
what is the logic behind requiring the header?
for example, to avoid using cookies and yet ensuring security, we pass a
loginkey for all pages.
every page has
include('securitycheck.php');
which parses
: [PHP] HTTP header question.
what is the logic behind requiring the header?
for example, to avoid using cookies and yet ensuring security, we pass a
loginkey for all pages.
every page has
include('securitycheck.php');
which parses the loginkey, uncompresses/decode it to get the userid
this helps everybody out.
Thanks,
Ben
-Original Message-
From: Richard Baskett [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 29, 2001 8:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] HTTP header question.
The way that I did it was by using sessions which if you have a login
you
On 30-Jul-2001 Ben Bleything wrote:
All I want to do is output Authentication failed above the form if
they type in invalid credentials. I want to do it by passing a header
that contains the same information as if there were a form submitted
that contained a field name failed and value
On 13-Jul-01 Tom Malone wrote:
Call me stupid, because this may be a stupid question, but I have searched
all over for the answer and cannot find it.
How can you get the username and password from HTTP_AUTH_USER or another
environment variable in PHP? I need to determine who is logging in
Use $HTTP_REFERER
http://php.net/manual/en/language.variables.predefined.php
-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: 11 iulie 2001 01:23
To: [EMAIL PROTECTED]
Subject: [PHP] http header
Dear all folks,
I want to get the url of the previous page that my
Hi,
install http://stunnel.org/ in localhost: and redirect it to
remote_host:443 with stunnel ;)
now you can talk simple http to localhost: and let stunnel do the
dirty work.
Hope this helps,
Nuno Silva
phpman wrote:
I've been working with curl as well. It allows a pretty easy
I've been working with curl as well. It allows a pretty easy method to
access https, however it is
limited as far as encrypting data and sending to an https server. So now i'm
experimenting with
snoopy to simulate a web client. I'm trying to link up with UPS online
tools, but the sob's only
know
As far as I know you cant do that with standard socket connection as SSL
needs more than that. One solution that I am currently using is using Curl
extensions of PHP which is working just fine. But you may need to recompile
PHP with curl support. For more info:
this seems to make my browsers not cache.
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
header(Last-Modified: . gmdate(D, d M Y H:i:s) . GMT);
header(Cache-Control: no-cache, must-revalidate);
header(Pragma: no-cache);
then add
header(WWW-Authenticate: Basic realm='$SERVER_NAME'
Try using this :
?php
$auth = false; // Assume user is not authenticated
if (isset( $PHP_AUTH_USER ) isset($PHP_AUTH_PW)) {
mysql_connect('localhost','root') or die (
'Unable to connect to server.' );
mysql_select_db( 'myDB' ) or die ( 'Unable to
select database.' );
Thanks Ive fixed my problem..
Thomas Edison Jr. wrote:
Try using this :
?php
$auth = false; // Assume user is not authenticated
if (isset( $PHP_AUTH_USER ) isset($PHP_AUTH_PW)) {
mysql_connect('localhost','root') or die (
'Unable to connect to server.' );
On 07-May-01 Mauricio Souza Lima wrote:
snip
And you have to inform the user to clean the password field, click ok,
then the pop-up will open again, then user click in cancel.
I just know that way to do. If anyone know another way, Postit!
create a tmp directory
logoff.php3:
Cool, you have found another way!
So the realm make diference? A user loged in a realm isn't the same in
other realm? Very cool...
Explain better your solution to us.
Regards,
Don Read wrote:
On 07-May-01 Mauricio Souza Lima wrote:
snip
And you have to inform the user to clean the
On 08-May-01 Mauricio Souza Lima wrote:
Cool, you have found another way!
So the realm make diference? A user loged in a realm isn't the same in
other realm? Very cool...
Not quite, the realm is a string to present to the login dialog box
it has no effect on the credentials in this
On Mar 08 May 2001 02:07, you wrote:
Never tried it though...but can you try to empty or unset the
$PHP_AUTH_USER/PWD ?
This doesn't work, thats why I use a login html page and sessions. :-)
Saludos... :-)
--
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952
-Original Message-
From: Martín Marqués [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 2:13 AM
To: elias
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] HTTP authentication : logout!!!
On Mar 08 May
Never tried it though...but can you try to empty or unset the
$PHP_AUTH_USER/PWD ?
-elias
http://www.eassoft.cjb.net
Thomas Edison Jr. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
i'm using http authentication for my php pages
(members area). Once you login
It dont work, what you have to do is that:
In the logout.php:
--
?
header( 'WWW-Authenticate: Basic realm=Private');
header( 'HTTP/1.0 401 Unauthorized' );
?
htmlbody
Logout Sucessful
/body/html
--
And you have to inform the user to clean the password field, click ok,
$PHP_AUTH_USER = ;
$PHP_AUTH_PW = ;
Ought to do it.
From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 8:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP authentication : logout!!!
Now i woul like to create a logout link after clicking
on which, whenever you
/)
- GameDesign, the industry source for game design and development issues
-Original Message-
From: Robert Covell [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 9:14 AM
To: Martín Marqués; elias
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] HTTP authentication : logout!!!
I must
Superb tutorial on Zend:
http://www.zend.com/zend/tut/authentication.php
HTH
Jon
-Original Message-
From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Sent: 26 April 2001 13:03
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP authentication for username password
How can I use the HTTP
:02 PM
To: Phillip Bow; [EMAIL PROTECTED]
Subject: Re: [PHP] HTTP Upload Problem
Just set it to 10, and same thing..
in my php.ini file it's set to 2M
upload_max_filesize = 2M
still clueless,
Yev
--- Phillip Bow [EMAIL PROTECTED] wrote:
I suspect there is a limit
Evan,
I have no good answer to your problem, but probably you should have a
look at Snoopy (snoopy.sourceforce.net), which implements HTTP posts,
along with some other nifty functions and is very easy to use.
Cheers,
Ben
"Montgomery-Recht, Evan" wrote:
I'm working through geting the raw
$string ="foo=barfood=apple";
$contentlength=$string.size;
$uuencodestring=uuencode($string);
uuencode ? are you looking at urlencode ?
use
$contentlength=strlen($string);
also remember according to the HTTP protocol, you have to show the length of
the encoded string, not the original;
[SMTP:[EMAIL PROTECTED]]
Sent:Monday, February 19, 2001 7:33 AM
To:Montgomery-Recht, Evan
Subject:Re: [PHP] HTTP POST Question
You have to use header() function and how POST work you can find in HTTP
RFC
at http://www.w3.org/Protocols/rfc2616/rfc2616.html
---
Hi
I read a article about posting data .. and there was a script but I dont
know resource of this script. But this is working. let me give you a example
?php
// Posting function
function PostToHost($host, $path, $data_to_send) {
$fp = fsockopen($host,80);
fputs($fp, "POST
To: Montgomery-Recht, Evan
Subject: Re: [PHP] HTTP POST Question
You have to use header() function and how POST work you can find in HTTP
RFC
at http://www.w3.org/Protocols/rfc2616/rfc2616.html
-
Milan Mlynarcik
Web Programme
, 2001 9:06 AM
To: Montgomery-Recht, Evan
Subject: Re: [PHP] HTTP POST Question
You can do it with socket functions.
-
Milan Mlynarcik
Web Programmer
Charmed Technology Slovakia
Nam. sv. Egidia 16/37
058 01 Poprad, Slovakia
I've been struggling with the same idea.
I haven't been able to process the returned value, but I've the
following methods to DISPLAY the cgi results. Although, the PHP has no
way of knowing wether the CGI evaluated to a Yes or No result.
If you solve this, then please let me know.
).
-Original Message-
From: Milan Mlynarcik [SMTP:[EMAIL PROTECTED]]
Sent: Monday, February 19, 2001 7:33 AM
To: Montgomery-Recht, Evan
Subject:Re: [PHP] HTTP POST Question
You have to use header() function and how POST work you can find in HTTP
RFC
at http:
Try with:
$HTTP_SERVER_VARS['SERVER_PROTOCOL']
$HTTP_SERVER_VARS['REQUEST_METHOD']
$HTTP_SERVER_VARS['REQUEST_URI']
HTH,
bojan
Javier Gil wrote:
I want to obtain the first line of the header of the HTTP Request
(the request line). Is there a function to obtain this line.
Thanks
--
On Wed, Feb 14, 2001 at 11:07:46PM -0800, Thomas Edison Jr. wrote:
The code I'm entering is:
?php
if(!isset($PHP_AUTH_USER)) {
Header("WWW-Authenticate: Basic realm=\"My Realm\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Text to send if user hits Cancel button\n";
exit;
} else {
I'm sure this wont' help, but just in case you may have missed the obvious
(it happens sometimesg)..Make sure you PHP script has the extension .PHP
.. The server won't recognize it as a PHP file otherwise, and it won't know
what to do with it. Also this extension has to be registred properly on
Sorry, I meant common header, not footer.
Inside my common "header" on my site ..
(which also includes the same "header") ...
- Original Message -
From: "Toby Miller" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 14, 2001 10:37 AM
Subject: [PHP] HTTP
Ive found the same thing and currently do not have a workaround, it seems
that browsers cache this. one method Ive thought of and never tested is to
set a session variable, cross reference that SessionID, PHP_AUTH_PW,
PHP_AUTH_USER are all valid, if not then your not loged in correctly. to log
cached pages from logged
in sessions, but I guess you can't have everything. :-)
Thanks,
Toby
- Original Message -
From: "Chris Lee" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 14, 2001 11:44 AM
Subject: Re: [PHP] HTTP Authentication not getting unset
El Mi 14 Feb 2001 12:37, Toby Miller escribi:
Hey all,
Hi,
This is far to long, so I'll strip a part of it.
Now if I try to read the $PHP_AUTH_USER or $PHP_AUTH_PW variables anyplace
on the site they don't exist, until I go back to one of the protected
pages. Then they miraculously
El Mi 14 Feb 2001 13:44, Chris Lee escribi:
Ive found the same thing and currently do not have a workaround, it seems
that browsers cache this. one method Ive thought of and never tested is to
set a session variable, cross reference that SessionID, PHP_AUTH_PW,
PHP_AUTH_USER are all valid, if
El Mi 14 Feb 2001 13:04, Toby Miller escribi:
Sorry, I meant common header, not footer.
Inside my common "header" on my site ..
(which also includes the same "header") ...
Don't worry, I understood it. ;-)
--
System Administration: It's a dirty job,
but someone told I had to do
OK, I loaded PHP with the ISAPI filter, but still no luck with
authentication..
Did you reboot? It is Windows...
I think ?php phpinfo();? will tell you if you are actually using ISAPI or
CGI or not... Maybe.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like
Nick,
I'm not sure were you are getting the value of $PHP_AUTH_USER from, so you
might want to try this snippet. This causes a dialog box to open and ask for
a username/password.
Also, in your code: you do not need to escape the quotes in the header.
?
// Check to see if $PHP_AUTH_USER
les/php/php.exe".
Do you know what is the matter?
Thanks in advance.
Nick.
- Original Message -
From: Shane McBride [EMAIL PROTECTED]
To: Nick Kostirya [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, February 07, 2001 7:06 PM
Subject: Re: [PHP] HTTP Authentication
Nick,
I
Greetings,
first of all you'll need to have all of your variables in one line:
like this for example
$vars="var1=".urlencode($var1)."var2=".urlencode($var2);
then you need to post the following
$header="POST /your_script.php HTTP/1.0\r\nContent-length:
".strlen($vars)\r\n\r\n$vars\r\n\r\n";
I've just started experimenting with ob_start("ob_gzhandler") a bit, and I
have found that if any output is generated before ob_start() is called,
nothing at all gets compressed; if ob_start() is called before any output,
everything is compressed.
Is this the case, I mean, is this "by
d'origine-
De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Envoye : dimanche 4 fevrier 2001 14:34
A : Alain Fontaine
Cc : [EMAIL PROTECTED]
Objet : Re: [PHP] HTTP compression
I've just started experimenting with ob_start("ob_gzhandler") a
bit, and I
have found that if an
'origine-
De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Envoye : dimanche 4 fevrier 2001 14:34
A : Alain Fontaine
Cc : [EMAIL PROTECTED]
Objet : Re: [PHP] HTTP compression
I've just started experimenting with ob_start("ob_gzhandler") a
bit, and I
have found that if any
Alain Fontaine wrote:
Sean,
Thanks, I see. How about headers ? Do they need to be compressed, too; in
other words, do headers "belong" to the output ?
a HTTP response is made of response header(s) and the response body.
Only the body
is compressed, and this is signaled in the headers so
Teodor,
Looked at it from that point of view, the question was pretty stupid ! ;)
-Message d'origine-
De : Teodor Cimpoesu [mailto:[EMAIL PROTECTED]]
Envoye : dimanche 4 fevrier 2001 19:09
A : Alain Fontaine
Cc : Sean Cazzell; [EMAIL PROTECTED]
Objet : Re: [PHP] HTTP compression
http://www.php.net/manual/features.http-auth.php
Pavel
P.S. Manual je nekdy docela prima cteni. ;-)
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 11, 2001 12:42 PM
Subject: [PHP] HTTP autentification
Please, can you send me where could I
201 - 255 of 255 matches
Mail list logo