Re: [PHP] How to send "post"-variables in a "Location" header

[email protected] ("[email protected]")
Newsgroups php.general
Message-ID <[email protected]>

> Ajay Garg <[email protected]> hat am 26. August 2013 um 21:48
> geschrieben:
>
>
> Hi all.
>
> I have a scenario, wherein I need to do something like this ::
>
> ###############################################################
>         $original_url = "/autologin.php";
>         $username = "ajay";
>         $password = "garg";
>
>         header('Location: ' . $original_url);
> ###############################################################
>
> As can be seen, I wish to redirect to the URL "autologin.php".
>
> Additionally, I wish to pass two POST key-value pairs :: "user=ajay" and
> "password=garg" (I understand that passing GET key-value pairs is trivial).
>
> Is it  even possible?
> If yes, I will be grateful if someone could let me know how to redirect to
> a URL, passing the POST key-value pairs as necessary.

Iirc it is not possible to pass post body content via location redirect.
What you can do: Set auth headers

http://forums.phpfreaks.com/topic/84480-solved-how-to-send-authorization-basic-header/

>
>
> Looking forward to a reply :)
>
>
> --
> Regards,
> Ajay

--
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: [email protected]

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.