RE: [PHP] Is it possible to send POST vars through a header redirect?
I thought the question was pretty straight forward. Sorry about that. As someone mentioned, yes I'm just trying to hide the var from the user. What I meant by I don't want it to stick with the session, is that I don't want it to be available from page to page. I want my script to run and redirect with the var to another page without the user seeing it. Currently, I am using GET and header(Location: http://domain/?somevar=somevalue;) I'll try some of the previous responses thanks for the help. -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Wednesday, February 04, 2009 12:58 PM To: Mike Roberts Cc: TS; php-general@lists.php.net Subject: RE: [PHP] Is it possible to send POST vars through a header redirect? Just look at the headers of EVERY email that comes from the mailing list, as they contain the unsubscribe email address. On Wed, 2009-02-04 at 09:47 -0500, Mike Roberts wrote: Ladies and Gentlemen. I am a recruiter who joined this list to understand a little about PHP. I respected the boundaries, and never tried to recruit you. Now I am asking for a courtesy in return. I have tried several ways and several times to be excluded from the list, but I still get emails. Can somebody who is 'in charge' please remove me from the list. Thank you. Michael Roberts Senior Recruitment Strategist Corporate Staffing Services 150 Monument Road, Suite 510 Bala Cynwyd, PA 19004 P 610-771-1084 F 610-771-0390 E mrobe...@jobscss.com -Original Message- From: TS [mailto:sunnrun...@gmail.com] Sent: Tuesday, February 03, 2009 5:47 PM To: php-general@lists.php.net Subject: [PHP] Is it possible to send POST vars through a header redirect? I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. Thanks, T Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is it possible to send POST vars through a header redirect?
At 2:52 AM -0700 2/5/09, TS wrote: I want my script to run and redirect with the var to another page without the user seeing it. Currently, I am using GET and header(Location: http://domain/?somevar=somevalue;) That would, by definition, allow the user to see it. If you want to pass a variable to another script, I know of four choices, namely: 1. Use POST; 2. Use GET; 3. Write the variable to a database; 4. Include the next script. HTH's tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to send POST vars through a header redirect?
2009/2/3 TS sunnrun...@gmail.com: I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. I'm not sure what you mean by stick with the session. What exactly are you trying to achieve? -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to send POST vars through a header redirect?
2009/2/4 Jônatas Zechim zechim@gmail.com: Try curl 1) I really wish people would look at other replies to a post before sending their own. Duplicates are rarely useful. 2) CURL cannot perform a header redirect as the OP is asking for, so the more useful response is to ask what they're actually trying to achieve because they're wanting to know how to do something that's not possible so the question is flawed. Rant over. -Stuart -Mensagem original- De: Stuart [mailto:stut...@gmail.com] Enviada em: quarta-feira, 4 de fevereiro de 2009 07:52 Para: TS Cc: php-general@lists.php.net Assunto: Re: [PHP] Is it possible to send POST vars through a header redirect? 2009/2/3 TS sunnrun...@gmail.com: I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. I'm not sure what you mean by stick with the session. What exactly are you trying to achieve? -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is it possible to send POST vars through a header redirect?
Ladies and Gentlemen. I am a recruiter who joined this list to understand a little about PHP. I respected the boundaries, and never tried to recruit you. Now I am asking for a courtesy in return. I have tried several ways and several times to be excluded from the list, but I still get emails. Can somebody who is 'in charge' please remove me from the list. Thank you. Michael Roberts Senior Recruitment Strategist Corporate Staffing Services 150 Monument Road, Suite 510 Bala Cynwyd, PA 19004 P 610-771-1084 F 610-771-0390 E mrobe...@jobscss.com -Original Message- From: TS [mailto:sunnrun...@gmail.com] Sent: Tuesday, February 03, 2009 5:47 PM To: php-general@lists.php.net Subject: [PHP] Is it possible to send POST vars through a header redirect? I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. Thanks, T -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is it possible to send POST vars through a header redirect?
At 9:47 AM -0500 2/4/09, Mike Roberts wrote: Ladies and Gentlemen. I am a recruiter who joined this list to understand a little about PHP. I respected the boundaries, and never tried to recruit you. Now I am asking for a courtesy in return. I have tried several ways and several times to be excluded from the list, but I still get emails. Can somebody who is 'in charge' please remove me from the list. Thank you. Michael Roberts Have you tried? To unsubscribe, visit: http://www.php.net/unsub.php It's at the bottom of every post. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to send POST vars through a header redirect?
Not possible to send POST in header if your aim is to hide vars from users. Could think about dynamically send POST using Javascript. form.send(); This requires some JS knowledge about how to exchange data between PHP and JS 2009/2/4 tedd tedd.sperl...@gmail.com At 9:47 AM -0500 2/4/09, Mike Roberts wrote: Ladies and Gentlemen. I am a recruiter who joined this list to understand a little about PHP. I respected the boundaries, and never tried to recruit you. Now I am asking for a courtesy in return. I have tried several ways and several times to be excluded from the list, but I still get emails. Can somebody who is 'in charge' please remove me from the list. Thank you. Michael Roberts Have you tried? To unsubscribe, visit: http://www.php.net/unsub.php It's at the bottom of every post. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to send POST vars through a header redirect?
Stuart wrote: 2009/2/4 Jônatas Zechim zechim@gmail.com: Try curl 1) I really wish people would look at other replies to a post before sending their own. Duplicates are rarely useful. 2) CURL cannot perform a header redirect as the OP is asking for, so the more useful response is to ask what they're actually trying to achieve because they're wanting to know how to do something that's not possible so the question is flawed. Rant over. -Stuart -Mensagem original- De: Stuart [mailto:stut...@gmail.com] Enviada em: quarta-feira, 4 de fevereiro de 2009 07:52 Para: TS Cc: php-general@lists.php.net Assunto: Re: [PHP] Is it possible to send POST vars through a header redirect? 2009/2/3 TS sunnrun...@gmail.com: I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. I'm not sure what you mean by stick with the session. What exactly are you trying to achieve? -Stuart -- http://stut.net/ Well, since the OP can't POST using header, then maybe alternatives to help them out? If you want to use sessions or are already using them (i.e. session_start() on each of the pages), you can just use session vars: session_start(); $_SESSION['var'] = 3; header(Location: http://domain/index.php;); exit; Then in the next page you have the var: session_start(); $var = $_SESSION['var']; -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is it possible to send POST vars through a header redirect?
Just look at the headers of EVERY email that comes from the mailing list, as they contain the unsubscribe email address. On Wed, 2009-02-04 at 09:47 -0500, Mike Roberts wrote: Ladies and Gentlemen. I am a recruiter who joined this list to understand a little about PHP. I respected the boundaries, and never tried to recruit you. Now I am asking for a courtesy in return. I have tried several ways and several times to be excluded from the list, but I still get emails. Can somebody who is 'in charge' please remove me from the list. Thank you. Michael Roberts Senior Recruitment Strategist Corporate Staffing Services 150 Monument Road, Suite 510 Bala Cynwyd, PA 19004 P 610-771-1084 F 610-771-0390 E mrobe...@jobscss.com -Original Message- From: TS [mailto:sunnrun...@gmail.com] Sent: Tuesday, February 03, 2009 5:47 PM To: php-general@lists.php.net Subject: [PHP] Is it possible to send POST vars through a header redirect? I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. Thanks, T Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to send POST vars through a header redirect?
On Tue, Feb 3, 2009 at 2:54 PM, Jim Lucas li...@cmsws.com wrote: TS wrote: I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. Thanks, T No, it is not possible. You will need to look into cURL or something else. But it cannot be done via the header() function. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You could always create major overhead and stick it in the database. Ha... -- Kyle Terry | www.kyleterry.com Help kick start VOOM (Very Open Object Model) for a library of PHP classes. http://www.voom.me | IRC EFNet #voom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to send POST vars through a header redirect?
TS wrote: I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. Thanks, T No, it is not possible. You will need to look into cURL or something else. But it cannot be done via the header() function. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to send POST vars through a header redirect?
On Tue, Feb 3, 2009 at 2:54 PM, Jim Lucas li...@cmsws.com wrote: TS wrote: I'm trying to send vars via POST somehow. Is this possible? Currently I'm doing header(Location: http://domain/index.php?var=3;); but, want to send POST or some other method that doesn't stick with the session. Thanks, T No, it is not possible. You will need to look into cURL or something else. But it cannot be done via the header() function. I second that you need to use curl: $header = array( MIME-Version=1.0, Content-type=text/html; charset=utf-8 ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this-elqPosturl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, $this-curlOptTimeOut); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); curl_setopt($ch, CURLOPT_PROXY, $this-proxyServer); curl_setopt($ch, CURLOPT_PROXYPORT, $this-proxyPort); curl_setopt($ch, CURLOPT_POSTFIELDS, $inputArray); curl_setopt($ch, CURLOPT_USERAGENT, 'MSIE'); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_HEADER, 1); $data = curl_exec($ch); Thanks, V