For the complete documentation index, see llms.txt. This page is also available as Markdown.

PHP sample code

This sample contains PHP example for connecting FRUITS API and JSON response

Sample code for connecting FRUITS API

<?php
$url = 'https://fwallet.net/fruits?requestType=getAccount&account=FRUITS-CNQB-X85V-HJNK-C2G5-CVJK-M6SQ';

$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Accept: application/json'
));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTREDIR, 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0.5);
curl_setopt($ch, CURLOPT_TIMEOUT, 2);
$result = curl_exec($ch);
curl_close($ch);
$json_feed = json_decode($result, true);

echo $result;

JSON response

Last updated