user125096: I have Bitcoin Core on Debian

Need to create new receiving address with PHP.
As you see at screenshot, I've try to create new address from terminal, but that does not added at Bitcoin Core Receiving Address List, address created but, it's address list empty again.
Need that way which can give me new address and also it inserted in "Requested payments history".
Is it possible with PHP? If yes please explain me how it is possible. Please do not send me only links: EasyBitcoin, Bit-Wasp, etc.
Is it possible with this "denpamusic/php-bitcoinrpc" and if yes, please help to to understand how it is possible.

user-1: 
Need that way which can give me new address and also it inserted in "Requested payments history

New address created with getnewaddress RPC command will be visible in 'receiving addresses'. I have created 2 addresses from CLI with getnewaddress.

Address created using 'Create new receiving address' button can have more information associated with it (date, message, amount etc.) which is saved in 'Requested payments history'. bcrt1qe4ryqy8lv59na0wkm6y96p8tu9njjlkme32szz in 'receiving addresses' was created using this option.


Is it possible with PHP?

Yes you can create new address with PHP:
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://localhost:18333/wallet/P1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"jsonrpc": "1.0", "id": "curltest", "method": "getnewaddress", "params": []}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Basic dXNlcjpwYXNz',
    'Content-Type: text/plain'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


RPC credentials used in above code:
regtest.rpcport=18333
rpcuser=user
rpcpassword=pass



125096: <p>I have Bitcoin Core on Debian</p>
<p><a href="https://i.stack.imgur.com/cQQPw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cQQPw.png" alt="Bitcoin Core" /></a></p>
<p>Need to create new receiving address with PHP.</p>
<p>As you see at screenshot, I've try to create new address from terminal, but that does not added at Bitcoin Core Receiving Address List, address created but, it's address list empty again.</p>
<p>Need that way which can give me new address and also it inserted in &quot;Requested payments history&quot;.</p>
<p>Is it possible with PHP? If yes please explain me how it is possible. Please do not send me only links: EasyBitcoin, Bit-Wasp, etc.</p>
<p>Is it possible with this &quot;denpamusic/php-bitcoinrpc&quot; and if yes, please help to to understand how it is possible.</p>
 -1: <blockquote>
<p>Need that way which can give me new address and also it inserted in &quot;Requested payments history</p>
</blockquote>
<p>New address created with <code>getnewaddress</code> RPC command will be visible in 'receiving addresses'. I have created 2 addresses from CLI with <code>getnewaddress</code>.</p>
<p><a href="https://i.stack.imgur.com/Ut5vp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ut5vp.png" alt="receiving-addresses" /></a></p>
<p>Address created using 'Create new receiving address' button can have more information associated with it (date, message, amount etc.) which is saved in 'Requested payments history'. <code>bcrt1qe4ryqy8lv59na0wkm6y96p8tu9njjlkme32szz</code> in 'receiving addresses' was created using this option.</p>
<p><a href="https://i.stack.imgur.com/6qyJe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6qyJe.png" alt="payment-history" /></a></p>
<blockquote>
<p>Is it possible with PHP?</p>
</blockquote>
<p>Yes you can create new address with PHP:</p>
<pre><code>&lt;?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL =&gt; 'http://localhost:18333/wallet/P1',
  CURLOPT_RETURNTRANSFER =&gt; true,
  CURLOPT_ENCODING =&gt; '',
  CURLOPT_MAXREDIRS =&gt; 10,
  CURLOPT_TIMEOUT =&gt; 0,
  CURLOPT_FOLLOWLOCATION =&gt; true,
  CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =&gt; 'POST',
  CURLOPT_POSTFIELDS =&gt;'{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;: &quot;curltest&quot;, &quot;method&quot;: &quot;getnewaddress&quot;, &quot;params&quot;: []}',
  CURLOPT_HTTPHEADER =&gt; array(
    'Authorization: Basic dXNlcjpwYXNz',
    'Content-Type: text/plain'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

</code></pre>
<p>RPC credentials used in above code:</p>
<pre><code>regtest.rpcport=18333
rpcuser=user
rpcpassword=pass

</code></pre>
