IP2Currency

GRATIS
Da fraudlabs | Aggiornamento vor 2 Jahren | Finance
Popolarità

0.1 / 10

Latenza

127,271ms

Livello di servizio

0%

Torna a tutte le discussioni

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

Rapid account: Christopherrdodd
christopherrdodd
vor 9 Jahren

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 vor 9 Jahren

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”
)
);

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti