IP Info

БЕЗКОШТОВНО
(Ким) NeutrinoAPI.com | Оновлено 22일 전 | Location
Популярність

9.3 / 10

Затримки

54ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

cURL under PHP code returns NULL

Rapid account: Gruszka Seb
gruszka.seb
8년 전

Hi,
When I’m running cURL on my PHP code, it always returns NULL value. When I’m running it from shell then it’s working correctly.
My PHP code is:

data=array(ip=>162.209.106.137,reverselookup=>false);data = array('ip' => '162.209.106.137', 'reverse-lookup' => 'false'); curl = curl_init();
curl_setopt(curl,CURLOPTURL,"https://communityneutrinoipinfo.p.mashape.com/ipinfo");curlsetopt(curl, CURLOPT_URL, "https://community-neutrino-ip-info.p.mashape.com/ip-info"); curl_setopt(curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt(curl,CURLOPTPOST,1);curlsetopt(curl, CURLOPT_POST, 1); curl_setopt(curl, CURLOPT_HTTPHEADER, array(‘X-Mashape-Key: gaqUL3298fmshIcz27izfRgcMdnkp1cWtjUjsntxmpSbuS6xSP’));
curl_setopt(curl,CURLOPTSSLVERIFYPEER,false);curlsetopt(curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt(curl, CURLOPT_POSTFIELDS, data);data); result = curl_exec(curl);if(!curl); if (!result) {
echo curl_error(curl); } curl_close(curl);
var_dump(json_decode($result, true));

Rapid account: Neutrinoapi
neutrinoapi Commented 8년 전

Hi gruszka,
Try this PHP code snippet here: https://www.neutrinoapi.com/api/api-examples/php/
You’ll need to create a new API key here as well: https://www.neutrinoapi.com/signup/

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення