RE: [PHP] Post but not Post

From: Date: Wed, 28 Mar 2001 23:50:13 +0000
Subject: RE: [PHP] Post but not Post
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45971@lists.php.net to get a copy of this message
I was just doing this a while back and ran into problems when going to 443. Any ideas on that? A regular fsockopen failed because of the security needed. -Bob -----Original Message----- From: Jason Brooke [mailto:jb@qgl.org] Sent: Wednesday, March 28, 2001 5:55 PM To: Peter Houchin; php-general@lists.php.net Subject: Re: [PHP] Post but not Post Use fsockopen to send the data: $host = "your.host"; $port = 80; $postdata = "field1=value1&field2=value2&field3=value3"; if ($sp = fsockopen($host, $port)) { fputs($sp,"POST /path/to/script.php HTTP/1.0\n"); fputs($sp,"Host: $host\n"); fputs($sp,"Content-type: application/x-www-form-urlencoded\n"); fputs($sp,"Content-length: ".strlen($postdata)."\n"); fputs($sp,"Connection: close\n\n"); fputs($sp,$postdata); fclose($sp); } jason > Hello. > > we all know that we can send variables to another PHP file via <form> tag > and with post method. > now i wonder if i can send variables from a script to another like POST > method but not using form tags. > like my question is how can i transfer data from form to form like the POST > of the <form> tag, but w/o session variables or cookies, or url parameters > (like the GET method), and w/o forms ofcourse? > > Currently, i'm doing this via hidden forms and automatic posting via > JavaScript, but is there is any clean and better way? > > Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#45971) next »