Re: Re: Putting $_POST into string to send to ASP

From: Date: Fri, 16 Jul 2004 21:52:28 +0000
Subject: Re: Re: Putting $_POST into string to send to ASP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190767@lists.php.net to get a copy of this message
Thee is a PEAR package to do posts, gets, etc. http://pear.php.net/package/HTTP_Request On Fri, 16 Jul 2004 14:00:02 -0700, Vail, Warren <warren.vail@schwab.com> wrote: > I believe we all missed something important here, but I've been wrong > before. > > Notice his URL below, specifically the "https" part. > > I believe this means that the data not only needs to be URL encoded but SSL > encrypted. I believe this makes a stronger case for using CURL, does it > not? I also would mean that his hack code would not work. > > Correct me if I'm wrong? > > Warren Vail > > -----Original Message----- > From: Lars Torben Wilson [mailto:torben@php.net] > Sent: Friday, July 16, 2004 12:32 PM > To: Jeff Oien > Cc: PHP > Subject: [PHP] Re: Putting $_POST into string to send to ASP > > Jeff Oien wrote: > > > Dumb question, sorry if it's a repeat. I will use PHP for a form with > > error checking. When there are no errors I need to send all the > > variables thru something like this: > > > > $URL = > > "https://example.com/script.asp?First=Jim&Last=Smith"; > > urlencode($URL); > > header("Location: $URL\n"); > > > > How do I gather up all the variables in $_POST and attach them as a > > string after the question mark? Thanks. > > Jeff > > Try the http_build_query() function. If you don't have PHP 5, look in the > user notes--someone appears to have written one for PHP 4 as well (the user > note 21-Jun-2004 from 'brooklynphil'). I haven't tested either one. > > http://www.php.net/manual/en/function.http-build-query.php > > Using this, you could just do something like: > > $query_string = http_build_query($_POST); > > Hope this helps, > > Torben <torben@php.net> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > !DSPAM:40f8402e320211411112355! > > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#190767) next »