How to $POST variables to php-fpm with nginx
steve at greengecko.co.nz
Mon Feb 23 04:01:45 UTC 2015
curl is the simplest...
$Request = curl_init();
curl_setopt ( $Request, CURLOPT_URL, "http://api.example.com" );
curl_setopt ( $Request, CURLOPT_ENCODING, 'gzip' );
curl_setopt ( $Request, CURLOPT_RETURNTRANSFER, true );
curl_setopt ( $Request, CURLOPT_POST, true );
$options ["var1"] = "value";
curl_setopt ( $Request, CURLOPT_POSTFIELDS, $options );
$Result = curl_exec ( $Request );
curl_close ( $Request );
Should be an ( untested ! ) starting point.
On Fri, 2015-02-20 at 22:31 -0800, David Benfell wrote:
> Hi all,
> In one of my sites, sks.disunitedstates.com, I have a single index
> page--index.html--which has a number of forms, one of which calls a
> php script named server-lookup.php. It means to pass a $POST variable
> to this script but instead, I get "No input file specified."
> Obviously, the variable isn't getting passed.
> I saw the answer at
> It doesn't work with this situation; I still get the same error.
> nginx mailing list
> nginx at nginx.org
Steve Holdoway BSc(Hons) MIITP
More information about the nginx