How to get new address on bitcoin core through extended public key i am going to lunch a new service for merchants to use my service API to receive payments directly in their wallets through xpub key , now i have installed bitcoin core is this possible with bitcoin core or i need as well electrum server 

&lt;?php
    //replace with your BIP32 extended public key
    $xpub = "xpub661MyMwAqRbcGTFHLp4c7j2hByE3qAZdN37FqJHTAmSPE2vfL4GAQ4mZvGZz4bVzpfdwoeoEBXWV5g2vWwP";
    $url = "https://api.smartbit.com.au/v1/blockchain/address/".$xpub;
    $fgc = json_decode(file_get_contents($url), true);
    $next = $fgc["address"]["extkey_next_receiving_address"];
    ?&gt;

    &lt;!DOCTYPE html&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;script type="text/javascript" src="js/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="js/qrcode.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;center&gt;&lt;br&gt;
    &lt;div id="qrcode"&gt;&lt;/div&gt;
      &lt;script type="text/javascript"&gt;
      new QRCode(document.getElementById("qrcode"), "&lt;?php echo $next; ?&gt;");
      &lt;/script&gt;
    &lt;br&gt;&lt;?php echo $next;?&gt;&lt;br&gt;
    &lt;/center&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    &lt;?php

    Print_r($fgc);
    ?&gt;
There are php libraries that you can use. For example the ones in my plugin bitcoin address in the includes/libs directory. These libraries were originally created by the authors of the bitcoin payments for woocommerce plugin.

There is also the bitwasp php library but it is a lot larger and does more things than merely deriving addresses from xpubs.