I am making a bitcoin faucet using the coinbase api, and was looking to validate the address. I looked online to see if there are any good scripts, and couldnt find any so I decided to test and see if it was already built in the API, and it was! The the thing is that instead of just saying that is not a valid address it php displays a LONG error...
Fatal error: Uncaught exception 'Coinbase_ApiException' with message 'Please enter a valid email or bitcoin address' in C:\xampp\htdocs ahtnam\lib\Coinbase\Rpc.php:84 Stack trace: #0 C:\xampp\htdocs ahtnam\lib\Coinbase\Coinbase.php(39): Coinbase_Rpc->request('POST', 'transactions/se...', Array) #1 C:\xampp\htdocs ahtnam\lib\Coinbase\Coinbase.php(118): Coinbase->post('transactions/se...', Array) #2 C:\xampp\htdocs ahtnam\faucet.php(54): Coinbase->sendMoney('17FSKMPAyXGR7EQ...', '0.00000555', 'this is a test') #3 {main} thrown in C:\xampp\htdocs ahtnam\lib\Coinbase\Rpc.php on line 84
Is ther any way i can just set $address_error to "Please enter a valid Address" (not email) if this occurs and also not display the error? Thanks!