BMI Calculator

PAID
By | Updated hace 13 días | Medical
Health Check

N/A

Back to All Discussions

api bmi doesn't work on my php website

Rapid account: Karinhp 1
karinhp1
hace 6 años

Hello,
I have PHP website and to a php page i have copied the code:

// These code snippets use an open-source library. http://unirest.io/php
$response = Unirest\Request::post(“https://bmi.p.mashape.com/”,
array(
“X-Mashape-Key” => “tMht3TOaWwmshYnJhPVM3xX9PWUPp1sf1Rljsnodwzz64Kl7BT”,
“Content-Type” => “application/json”,
“Accept” => “application/json”
)
"{“weight”:{“value”:“85.00”,“unit”:“kg”},“height”:{“value”:“170.00”,“unit”:“cm”},“sex”:“m”,“age”:“24”,“waist”:“34.00”,“hip”:“40.00”}"
);

inside <?php ?>

and i have got this error on browser:

Parse error: syntax error, unexpected ‘"{“weight”:{“value”:"85.0’ (T_CONSTANT_ENCAPSED_STRING), expecting ‘,’ or ‘)’

Join in the discussion - add comment below:

Login / Signup to post new comments