If we look at it as a replacement of blockchain.info receive API, the purpose it needs to serve is simple...
1. Generate an address for the user.
2. Get informed when there is an amount on that address as well as the amount itself.
3. Swipe the fund from this address to a pre-defined address.
Can the above be achieved online (as we need it for a website ofcourse) without running two VPS instance ? And even if I have a VPS, can Step 2 be done using https://github.com/Bit-Wasp/bitcoin-lib-php ?
- Generate an extended public key and create address.
- Give that unique address to customer.
- Check if that address received any Bitcoins using any block explorers or you can use Bitcoin core.
- Etcetera...
If you want to spend from that address, creat and sign transaction with XPRV locally using any of the software listed above and broadcast it.
P.S. https://github.com/Bit-Wasp/bitcoin-lib-php won't check transactions or notify you. You will have to add a simple script for checking transactions.