PHP code example of crypto-technology / cryptocurrency
1. Go to this page and download the library: Download crypto-technology/cryptocurrency library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
crypto-technology / cryptocurrency example snippets
# See index.php for all examples
// Initialize new CryptocurrencyCollection()
$crypto_coll = new \CryptoTech\Cryptocurrency\CryptocurrencyCollection();
// Load the array with all cryptocurrencies enabled
$crypto_enabled = (n');
// Return (int) cryptocurrency id (CoinMarketCap ID)
var_dump($bitcoin->getId());
// Return (string) cryptocurrency name
var_dump($bitcoin->getName());
// Return (string) cryptocurrency symbol
var_dump($bitcoin->getSymbol());
// Return (string) cryptocurrency type
// Can be 'coin' or 'token'
var_dump($bitcoin->getType());
// Return (string) cryptocurrency logo path with specified size
// Size can be '16', '32', '64', '128' or '200'
// Path must be the sub-path that allows you to get the correct logo path
// (sub-path must be point to the parent directory of crypto-logo directory)
var_dump($bitcoin->getLogo('128', '.'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR));
// Return (boolean) cryptocurrency mineable state
var_dump($bitcoin->isMineable());
// Return (string) cryptocurrency description
var_dump($bitcoin->getDescription());
// Return (array) cryptocurrency official project url
var_dump($bitcoin->getProjectUrl());
// Return (array) cryptocurrency explorer urls
// These urls can be used, for example, with sprintf($url, $wallet_address)
// because each url is returned in the format 'https://explorer/address/%s'
// where %s can be replaced with a wallet address for get information
// on that specific wallet address (the page response should be, in almost
// all cases, in json format)
var_dump($bitcoin->getExplorerUrl());
// Return (array) cryptocurrency sourcecode url
var_dump($bitcoin->getSourceCodeUrl());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.