Re: [PHP] Posting variables from one php script to another
I tried this test: //CURL $ch = curl_init ("$myURL/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); for some reason it is not sending the posted variables the script is curling the other php script as it is echoing. Unfortunately, it is not passing along the Posted variables anyone know ? On Sep 22, 2005, at 6:52 PM, Jasper Bryant-Greene wrote: Graham Anderson wrote: In a POST request: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php"); I think you may need to put the full URL here. I don't do a lot with CURL, though, so someone else may be able to help you more here. -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting variables from one php script to another
Graham Anderson wrote: In a POST request: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php"); I think you may need to put the full URL here. I don't do a lot with CURL, though, so someone else may be able to help you more here. -- 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
Re: [PHP] Posting variables from one php script to another
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; 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting variables from one php script to another
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