$api_url, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($params), CURLOPT_TIMEOUT => 30, ]); $response = curl_exec($ch); curl_close($ch); return json_decode($response, true); } // 1) Account balance $balance = smm_request($api_url, ['key' => $api_key, 'action' => 'balance']); echo 'Balance: ' . $balance['balance'] . ' ' . $balance['currency'] . PHP_EOL; // 2) Full service list $services = smm_request($api_url, ['key' => $api_key, 'action' => 'services']); print_r($services); // 3) Place a new order $order = smm_request($api_url, [ 'key' => $api_key, 'action' => 'add', 'service' => 1, 'link' => 'https://instagram.com/example', 'quantity' => 100, ]); echo 'New order ID: ' . $order['order'] . PHP_EOL; // 4) Order status $status = smm_request($api_url, ['key' => $api_key, 'action' => 'status', 'order' => $order['order']]); print_r($status);