Solved

HTTP authentication

Posted on 2001-06-18
9
216 Views
Last Modified: 2006-11-17
Hi, I am trying to collect login name and password from the client and pipe them to authenticate via HTTP authentication(.htaccess). But instead of having a small login window pop up, I would like to use text boxes. I tried the following code but the window still pops up and asks for login/password. Is there any other way to achieve my goal?

<?
  header("location:$login:$pswd@myhost.com/members/index.htm");
?>

Here, $login and $paswd are passed by HTTP POST method and as you might have guessed, /members directory is protected by .htpasswd. Any help/suggestion would be appreciated.
0
Comment
Question by:as66422
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6201614
I believe it's not possible - that's just the way HTTP Authentication works - but I'd love to be proven wrong. :o)

Ant
0
 
LVL 8

Expert Comment

by:us111
ID: 6201678
header("location:$login:$pswd@myhost.com/members/index.htm");  won't work

hmm not possible or ,maybe with the fsockopen function, it should work
0
 
LVL 8

Accepted Solution

by:
us111 earned 100 total points
ID: 6201703
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 8

Expert Comment

by:us111
ID: 6201722
0
 
LVL 2

Expert Comment

by:higijj
ID: 6203027
wouhou!

The best way to learn stuff like that.. is to intercep all packets send from/to your couputer.. with a sniffer ;-)

that way, you'll see how it works.. and you can simulate the same thing with socket programming!

0
 
LVL 8

Expert Comment

by:us111
ID: 6203046
heavy and huge solution, higijj :)))
the sample at
http://www.phpbuilder.com/mail/php-general/2000091/1829.php  works very well without sniffing :))
0
 
LVL 2

Expert Comment

by:higijj
ID: 6203121
I know!

but I meant for any kind of situation like this..
;-)

0
 

Author Comment

by:as66422
ID: 6203406
Thanks a million us111 you just made my day!!!
0
 

Author Comment

by:as66422
ID: 6203407
Thanks a million us111 you just made my day!!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question