Welcome! Log In Create A New Profile

Advanced

Re: How to $POST variables to php-fpm with nginx

February 22, 2015 11:04PM
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.

Steve


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
> http://serverfault.com/questions/231578/nginx-php-fpm-where-are-my-get-params
>
> It doesn't work with this situation; I still get the same error.
>
> Thanks!
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to $POST variables to php-fpm with nginx

David Benfell February 21, 2015 01:32AM

Re: How to $POST variables to php-fpm with nginx

GreenGecko February 22, 2015 11:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready