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:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:55 PM
To: Peter Houchin; [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to