Re: Posting variables from one php script to another
| From: | Al | Date: | Fri, 23 Sep 2005 12:30:33 +0000 |
| Subject: | Re: Posting variables from one php script to another | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223065@lists.php.net to get a copy of this message | ||
Graham Anderson wrote:
I am using GET to send variables from one php script to another php script How would I POST the same variables ? This is the php script I am sending GET variables to... $movieBuilder = "./movieBuilder.php?mask=mask.gif&drag=drag.gif&movie=fonovisa.mov"; I am placing $movieBuilder in the "src = " attribute Is it possible to POST these same variables to movieBuilder.php ? The below generates a Quicktime movie: $xml = <<<EOB <?xml version="1.0"?> <?quicktime type="application/x-quicktime-media-link"?> <embed autoplay="$autoplay" cache="$cache" kioskmode="$kioskmode" quitwhendone="$quitwhendone" movieid="$movieid" moviename="$moviename" src="$movieBuilder"/> EOB; many thanksI'd use this. It's simple and doesn't involve CURL. Here is a brief outline. $file_str= base64encode(serialize($_GET)); //$_GET can be any array Create a temporary file and write your string fwrite($temp, $file_str); fetch your data with $saved_get= unserialize(base64decode(file_get_contents(filename)); Unlink your file when done with it.