Accessing Metaname with PHP

Getting started

  1. Download and unpack the client library for PHP, which is pre-populated with your API credentials unless you already have an API key. You must be signed in to download
  2. Run the first example:

    php  account-balance.php
    

Your Metaname account balance should be printed. Platforms without the command-line part of PHP might need the code uploaded to a web server before it will work.

For debugging validation errors with parameters, invoke with:

json_rpc_trace=stdout  \
  php  account-balance.php

NOTE: Please do not test your code on the Production site. Instead, create an account on and test with the Test site. Either edit the URL given to new JsonRpcClient in lib/Metaname.php to refer to the test site and update the credentials in lib/my_metaname.php to those of your account on the Test site, or download the archive linked above from the Test site.