Welcome to Quark Community

Quark is an open source software used mainly as a digital currency that employs multiple cryptographic algorithms, which unlike fiat/national currencies provides the platform for a decentralised monetary system.

Quark was launched in 2013 with the belief that the control of money should not be in the hands of the few, but in the hands of the many. This forum tries to build on that ideology by distributing Quarks in the hands of those that are active in the community. By posting quality articles and contributing to general discussions you will earn Quarks.


Sign up Learn more about Quark
  1. Important!

    Quark protocol has been changed to a POW/POS hybrid. The hard fork will take effect starting with block 4937000 ~ 25 November 2017. By that time make sure you run at least version 0.10.6.1

    To download the wallet for the latest version go here:
    https://quarktalk.cc/resources/categories/downloads.2/

Quark JSON-RPC api commands using PHP 1

php rpc quark

  1. Mako
    If you want to start a web project in Quark you can use the attached script and below instructions t0 access Quark RPC commands using PHP.

    To use this PHP script you need to make sure that you have Quark running and the Quark configuration file includes the RPC details. See chapter 2.2 of this guide for more details: http://quarktalk.org/resources/quark-wallet-configuration-file-information.28/

    To connect to your Quark daemon use:
    Code:
    // Optionally, you can specify a host and port
    $quark = new Quark('yourRPCuser','yourRPCpassword','host','port');
    


    If you wish to make an SSL connection you can set an optional CA certificate or leave blank
    Code:
    // This will set the protocol to HTTPS and some CURL flags
    $quark->setSSL('/full/path/to/mycertificate.cert');
    


    Make calls to quarkcoind as methods for your object. Responses are returned either as text or array depending on the method called.
    Code:
    //Examples
    $quark->getinfo(); // array
    $quark->getbalance("*", 1); // float
    $quark->getunconfirmedbalance(); // float
    $quark->validateaddress('QUARK957iywYSpgkYi9gbW3pFtLszeU7wQ'); // array
    


    When a call fails for any reason, it will return FALSE and put the error message in $this->error
    Code:
    if (!empty($quark->error)) die($quark->error);



    If you want to make transactions but your wallet is encrypted you need to use walletpassphrase first
    Code:
    $quark->walletpassphrase('yourwalletpassword', 1);
    $quark->settxfee(0);
    $txid = $quark->sendtoaddress('QUARK957iywYSpgkYi9gbW3pFtLszeU7wQ', 100); // address, amount
    echo  $txid;


    To get the list of all API calls available:
    Code:
    echo "<pre>";
    var_dump($quark->help());
    echo "</pre>";

    I hope you found this short tutorial useful for your Quark web applications.
    Dodorama likes this.

Recent Reviews

  1. drgncabe
    drgncabe
    5/5,
    Version: 1
    Perfect, exactly what I needed.