Re: @ character in http login



Michael B. Trausch <michael.trausch.no.spam@xxxxxxxxxxx> wrote:
simonp@xxxxxxxxxx wrote in <e2eq70$2ht$1@xxxxxxxxxxxxxxxxx> on Sat April 22
2006 22:53:

I am trying to use the basic http://user:password@xxxxxxxxxxx
form for authentication inside a script.

My only problem is my username contains the @ character (its an
email address). As result, the url seems to be parsing
incorrectly.

Has anyone found a way around this problem?

Cheers
Simon


Well, the way it usually works is:

http://user:pass@server/

You may be able to try this:

http://user%40sample.com:pass@server



Thank you for the pointer, it pointed me to the right solution.

It looks like &#64; is the escape character that works for @,
rather than %40. On using the parse_url() function on the url,
the correct email username was returned for the user element in
the resulting array.

Cheers
Simon

--
Stupendous Tales
www.stupendoustales.com
Speculative Fiction, Pulp Dreams
.



Relevant Pages

  • Re: @ character in http login
    ... form for authentication inside a script. ... My only problem is my username contains the @ character (its an ...
    (comp.lang.php)
  • Re: Adding user to group with # in username
    ... "jeepers" wrote in message ... > We have a script that will add users to a group but if the username starts ... with a # character, the script errors and the user is not added to the ... at the begining of the username. ...
    (microsoft.public.windows.server.scripting)
  • Re: @ character in http login
    ... form for authentication inside a script. ... My only problem is my username contains the @ character (its an ...
    (comp.lang.php)
  • @ character in http login
    ... form for authentication inside a script. ... My only problem is my username contains the @ character (its an ...
    (comp.lang.php)
  • Request for comments - kgets()
    ... macro and a function-like macro macros below) ... pointers, dereferencing pointers, pointer arithmetic, and how (at ... character by character I can discuss a conceptual model of the ... FIFO Model - A block of memory having two pointers. ...
    (comp.lang.c)