Re: Posting variables from one php script to another
| From: | Graham Anderson | Date: | Fri, 23 Sep 2005 01:48:33 +0000 |
| Subject: | Re: Posting variables from one php script to another | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223044@lists.php.net to get a copy of this message | ||
so is it like this? ? CURL is not quite working yet....
In a GET request:
$movieBuilder would be:
$movieBuilder = "./movieBuilder.php?mask=mask.gif&drag=drag.gif&movie=fonovisa.mov";
putting $movieBuilder in the src attribute does work.
In a POST request:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'mask=mask.gif&drag=drag.gif&movie=fonovisa.mov');
$movieBuilder = curl_exec ($ch);
And, now put $movieBuilder in the 'src' attribute in the embed tag:
//Generate the Quicktime movie
$xml = <<<EOB
<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-media-link"?>
<embed
src="$movieBuilder"/>
EOB;
many thanks :)
g
On Sep 22, 2005, at 5:31 PM, Jasper Bryant-Greene wrote:
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 ?http://php.net/curl You can use the CURL functions to send a POST request. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php