IP2Currency

फ़्री
द्वारा fraudlabs | अपडेट किया गया hace 2 años | Finance
Health Check

N/A

सभी चर्चाओं पर वापस जाएं

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

Rapid account: Christopherrdodd
christopherrdodd
hace 9 años

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 hace 9 años

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

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें