Different PHP functions for Crown(CRW) including Wordpress
We're attempting to compile some useful PHP functions for anyone to use within their website.
They're simple to use, just replace RPCUSER:RPCPASS with your Crown RPC details.
If you're not using wordpress then you will need to create your own method of obtaining a Users Crown(CRW) address.
If you are using wordpress take note of 'get_user_crown_address'.
$getUserMeta = get_user_meta($getID, $key = 'get_user_crown_address', $single = true);
This is a manually setup metatag made using the Ultimate Member plugin.
The plugin allows admins to customise their registration form.
Using edit, make a new form box and call it get_user_crown_address.
The code will now pull the users address when they're logged in.
If you're not using wordpress then you will need to create your own method of obtaining usernames.
If you are using wordpress then all is taken care of.
This will allocate an account on the Crown client. The user is shown the account address for them to use in some way.
If you're not using wordpress then you will need to create your own method of obtaining usernames.
If you are using wordpress then all is taken care of.
This will get the users account address from the Crown client. The user is shown the account address for them to use in some way.
This is a wordpress only function.
It will send from the admin wallet "0" account and sent to the logged in user.
This function has two uses.
If you would like a user to just get a random address then user the function without wordpress features.
If you would like to generate another account address for the logged in user then use the wordpress function.
For non wordpress use, this function will show the last 50 transactions made from the admin/owerner wallet.
For wordpress use, this function shows the logged in user their last n number of transactions.
For non wordpress use, this function will show the total balance of the admin/owerner wallet.
For wordpress use, this function shows the logged in users account balance.
Simple getblockcount command which returns current blockchain height.
Simple masternode(count) command to show the amount of masternodes opperating on the network.
Simple systemnode(count) command to show the amount of masternodes opperating on the network.
Shows projected passing proposals.
Shows the next superblock height.
Shows the network difficulty.
Shows the network hashrate.
Shows the total amount of tokens on the Crown Platform.
There are 4 versions of this function.
Two with wordpress functionallity and two without.
The two without will need a way of pulling Crown addresses while the wordpress
functions already pull.