• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

HTTP authentication

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
as66422
Asked:
as66422
  • 4
  • 2
  • 2
  • +1
1 Solution
 
a.marshCommented:
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
 
us111Commented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
us111Commented:
0
 
higijjCommented:
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
 
us111Commented:
heavy and huge solution, higijj :)))
the sample at
http://www.phpbuilder.com/mail/php-general/2000091/1829.php  works very well without sniffing :))
0
 
higijjCommented:
I know!

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

0
 
as66422Author Commented:
Thanks a million us111 you just made my day!!!
0
 
as66422Author Commented:
Thanks a million us111 you just made my day!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now