Re: Re: Posting variables from one php script to another
| From: | Jasper Bryant-Greene | Date: | Fri, 23 Sep 2005 21:33:11 +0000 |
| Subject: | Re: Re: Posting variables from one php script to another | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223102@lists.php.net to get a copy of this message | ||
Graham Anderson wrote:
As an alternative, if I: 1) posted variables to a script with curl $ch = curl_init ("path2myScript/movieBuilder.php"); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST,1); curl_setopt ($ch, CURLOPT_POSTFIELDS, "mask=mask.gif&drag=drag.gif&movie=fonovisa.mov"); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $buffer = curl_exec($ch); // execute the post //echo $buffer; curl_close ($ch); } 2) write the 'src' attribute as './movieBuilder.php' with no variables passed $xml = <<<EOB <?xml version="1.0"?> <?quicktime type="application/x-quicktime-media-link"?> <embed src="./movieBuilder.php"/> EOB; Would the movieBuilder.php file retain the POST'ed variables ? Or, would they be lost in the void. maybe this approach is silly?You could save the variables to a file. But it's silly and slow when you could just use GET. Can you explain why you don't want to just send them as GET variables in the query string? -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/