IP2Currency

무료
분류별 fraudlabs | 업데이트됨 2 года назад | Finance
인기

0.1 / 10

지연 시간

127,294ms

서비스 수준

0%

모든 토론으로 돌아가기

Catchable fatal error: Object of class Unirest\Response could not be converted to string

Rapid account: Christopherrdodd
christopherrdodd
9 лет назад

Getting the following error when trying to run the API with PHP:

Catchable fatal error: Object of class Unirest\Response could not be converted to string

Here is how I am implementing it with PHP:

include_once("…/private/unirest-php/src/Unirest.php");

$dayCostUrl = “https://farebookings-free-and-real-time-currency-conversion.p.mashape.com/devel.farebookings.com/api/curconversor/THB/USD/260/json”;

dayCost=Unirest\Request::get(dayCost = Unirest\Request::get(dayCostUrl,
array(
“X-Mashape-Key” => “RBaR00xcwwmsh87WFynWrdXlO9xzp10N94YjsnKVQlAYBL0WwA”,
“Accept” => “text/plain”
)
);

echo $dayCost;

Please help me solve this issue.

Regards, Chris

Rapid account: Fraudlabs
fraudlabs Commented 9 лет назад

Please see the following code for how to call IP2Currency. You will need to sign up for a free (or paid) license key at http://fraudlabs.com/ip2currency.aspx which you will need to insert into the code below.

$response = Unirest\Request::get(“https://fraudlabs-ip2currency-v1.p.mashape.com/ip2currencywebservice.asmx?LICENSE=<required>”,
array(
“X-Mashape-Key” => “mC3RMkoFezmshtpIjYXY7RO4kvyxp1NnIoKjsnxjR1UU2R3HHs”,
“Accept” => “application/xml”
)
);

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입