BMI Calculator

ÜCRETLİ
Taraf | Güncelleyen 17 days ago | Medical
Health Check

N/A

Tüm Tartışmalara Dön

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

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun