<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Простой пример отправки транзакции PHP Curl]]></title><description><![CDATA[<p dir="auto">Простой пример отправки транзакции через PHP Curl с примечанием к платежу:</p>
<p dir="auto"><strong><strong>!Важно отправлять данные на доверенную ноду, т.е. на вашу.</strong></strong></p>
<pre><code class="language-php">&lt;?php
$url = 'http://node_ip:6100/api/transactions';
$data = json_encode((object) array(
            "secret" =&gt; "секретная фраза адреса отправителя",
            "amount" =&gt; 10000000, //0.1 STH в Satoshi
            "recipientId" =&gt; "Sa9JKodiNeM7tbYjxwEhvvG1kBczhQxTN3", //адрес получателя
            "vendorField" =&gt; "any message" // опциональное поле 64 байт
        ));

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json'));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true); //convert to array
print_r($result); //show result
</code></pre>
<p dir="auto">Результат выполнения при успехе примерно следующий:</p>
<pre><code class="language-json">Array ( 
     [success] =&gt; 1 
     [transactionId] =&gt; 97fc4c43279a27e7c28a4058ce06219434a0b4f97e6bf5a12f9ebb41a739652a
) 
</code></pre>
<p dir="auto">*При использовании двух парольных фраз добавьте поле <strong>secondSecret</strong></p>
<p dir="auto">Пример добавлен в <a href="https://api.smartholdem.io/#send-tx-php" target="_blank" rel="noopener noreferrer nofollow ugc">документацию</a></p>
]]></description><link>https://community.smartholdem.io/topic/314/простой-пример-отправки-транзакции-php-curl</link><generator>RSS for Node</generator><lastBuildDate>Sat, 17 Oct 2026 09:23:05 GMT</lastBuildDate><atom:link href="https://community.smartholdem.io/topic/314.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Apr 2018 19:45:59 GMT</pubDate><ttl>60</ttl></channel></rss>