BMI Calculator

付费
通过 | 已更新 17 days ago | Medical
Health Check

N/A

返回所有讨论

api bmi doesn't work on my php website

Rapid account: Karinhp 1
karinhp1
6 years ago

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 ‘)’

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论