Advertise with us (we do not endorse any site advertised)

Author Topic: Use php to get received by address. with and w/o the client.  (Read 4886 times)

0 Members and 1 Guest are viewing this topic.

Offline dodokingTopic starter

  • King of the coins!
  • Sr. Member
  • ***
  • Joined: Dec 2011
  • Location: Underwater
  • Posts: 283
  • Country: 00
  • Karma: +5/-0
  • DDK ALL DAY
    • twitter.com/dodoking1
    • View Profile
    • Under Construction
  • Bitcoin Address: 1AAmdfuC3psSNWgFmUUzqFCdVmCco7ZiRx
Get received by address using cryptocoin client.
Code: [Select]
<?php
$Crypto_Coin_Address 
"1WRq2kF7F5b1F3pJx7mi7Prsr2TtEDKaD";
require
'jsonRPCClient.php';

$Crypto_Coin_Client = new jsonRPCClient('http://username:password@127.0.0.1:8333/');
$Received_Amount $Crypto_Coin_Client->getreceivedbyaddress($Crypto_Coin_Address);

if(
$Received_Amount) {
   echo 
$Received_Amount;
} else {
   echo 
"<i>Connection Error</i>";
}
?>


Get received by address without using cryptocoin client.(btc only)
You can change $Live_Address_Scan to a Alt coin block explorer for other coins.
Code: [Select]
<?php
$Address 
"1WRq2kF7F5b1F3pJx7mi7Prsr2TtEDKaD";
$Live_Address_Scan "http://blockexplorer.com/q/getreceivedbyaddress/$Address";

$ch curl_init($Live_Address_Scan);
curl_setopt($chCURLOPT_REFERER'Mozilla/5.0 (compatible; GetReceivedBy; '.php_uname('s').'; PHP/'.phpversion().')');
curl_setopt($chCURLOPT_USERAGENT"CakeScript/0.1");
curl_setopt($chCURLOPT_HEADER0);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
$Donated_Bitcoins curl_exec($ch);
curl_close($ch);

echo 
$Donated_Bitcoins;
?>



 

How to use send many with php

Started by dodoking

Replies: 0
Views: 6379
Last post May 06, 2012, 05:51:58 PM
by dodoking
How to send Bitcoins with php

Started by dodoking

Replies: 0
Views: 4242
Last post May 06, 2012, 06:48:01 PM
by dodoking
Use php to get your current wallet balance

Started by dodoking

Replies: 4
Views: 8179
Last post June 24, 2012, 07:16:12 PM
by dodoking
How to find out the sender address?

Started by makler12

Replies: 10
Views: 9686
Last post September 29, 2012, 01:52:37 PM
by flaab
Client keeps switching addresses.

Started by doodle

Replies: 2
Views: 4387
Last post April 14, 2013, 07:32:15 PM
by slc334

your ads here