Bitcoin Forum
December 08, 2016, 10:12:02 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [PHP] BlockExplorer Track following script  (Read 2894 times)
joepie91
Sr. Member
****
Offline Offline

Activity: 294


View Profile
June 21, 2011, 04:19:07 AM
 #1

Posting this for a friend... he does not have sufficient posts to post in here yet.

It basically searches back through the blockchain (using Block Explorer) to find the earliest trace of an address (by following the first address link on every page).

Code:
<?php
/*
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
                    Version 2, December 2004 

         Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified 
 copies of this license document, and changing it is allowed as long 
 as the name is changed. 

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 

  0. You just DO WHAT THE FUCK YOU WANT TO. 
*/

/* This program is free software. It comes without any warranty, to
 * the extent permitted by applicable law. You can redistribute it
 * and/or modify it under the terms of the Do What The Fuck You Want
 * To Public License, Version 2, as published by Sam Hocevar. See
 * http://sam.zoy.org/wtfpl/COPYING for more details. */

/* Questions? ask Skullby <skullby@hush.com> */

error_reporting(0);
ini_set('display_errors','Off');

//$startHash = "166inTrZD3G9SMKRcsaRnvFcCbeSrKoyxL"; 
$startHash "18ukPi1oAcLau91YfpTkXY1EuZrYxZyUBx"// a hash I found, and wanted to trace backward in time. :)

getNext($startHash);

function 
getNext($hash) {
if (
$hash == "") {
  echo 
"\ndone\n";
  die;
}
$handle fopen("http://blockexplorer.com/address/".$hash,"r");
$contents ''
while (!
feof($handle)) {
  
$contents .= fread($handle8192);
}
fclose($handle);

$lines split("\n",$contents);

foreach (
$lines as $key=>$line) {
 if (
$line == "<td>Received: Address</td>") {
      
$found 1;
 }

 if (
$found == && strstr($line,"<li><a href=")) {
    
preg_match('/<li><a href="\/address\/(.*)">/',$line,$matches);
    echo 
$matches[1]."\n";
    
sleep(2);
    
getNext($matches[1]);
 }


}
 
}
?>

Like my post(s)? 12TSXLa5Tu6ag4PNYCwKKSiZsaSCpAjzpu Smiley
Quote from: hawks5999
I just can't wait for fall/winter. My furnace never generated money for me before. I'll keep mining until my furnace is more profitable.
1481235122
Hero Member
*
Offline Offline

Posts: 1481235122

View Profile Personal Message (Offline)

Ignore
1481235122
Reply with quote  #2

1481235122
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481235122
Hero Member
*
Offline Offline

Posts: 1481235122

View Profile Personal Message (Offline)

Ignore
1481235122
Reply with quote  #2

1481235122
Report to moderator
1481235122
Hero Member
*
Offline Offline

Posts: 1481235122

View Profile Personal Message (Offline)

Ignore
1481235122
Reply with quote  #2

1481235122
Report to moderator
Chick
Member
**
Offline Offline

Activity: 70


View Profile
June 21, 2011, 05:00:08 AM
 #2

Posting this for a friend... he does not have sufficient posts to post in here yet.

It basically searches back through the blockchain (using Block Explorer) to find the earliest trace of an address (by following the first address link on every page).

Code:
<?php
/*
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
                    Version 2, December 2004 

         Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified 
 copies of this license document, and changing it is allowed as long 
 as the name is changed. 

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 

  0. You just DO WHAT THE FUCK YOU WANT TO. 
*/

/* This program is free software. It comes without any warranty, to
 * the extent permitted by applicable law. You can redistribute it
 * and/or modify it under the terms of the Do What The Fuck You Want
 * To Public License, Version 2, as published by Sam Hocevar. See
 * http://sam.zoy.org/wtfpl/COPYING for more details. */

/* Questions? ask Skullby <skullby@hush.com> */

error_reporting(0);
ini_set('display_errors','Off');

//$startHash = "166inTrZD3G9SMKRcsaRnvFcCbeSrKoyxL"; 
$startHash "18ukPi1oAcLau91YfpTkXY1EuZrYxZyUBx"// a hash I found, and wanted to trace backward in time. :)

getNext($startHash);

function 
getNext($hash) {
if (
$hash == "") {
  echo 
"\ndone\n";
  die;
}
$handle fopen("http://blockexplorer.com/address/".$hash,"r");
$contents ''
while (!
feof($handle)) {
  
$contents .= fread($handle8192);
}
fclose($handle);

$lines split("\n",$contents);

foreach (
$lines as $key=>$line) {
 if (
$line == "<td>Received: Address</td>") {
      
$found 1;
 }

 if (
$found == && strstr($line,"<li><a href=")) {
    
preg_match('/<li><a href="\/address\/(.*)">/',$line,$matches);
    echo 
$matches[1]."\n";
    
sleep(2);
    
getNext($matches[1]);
 }


}
 
}
?>

Ahahahah, I shouldn't run into any problems with that license. Smiley

bitlotto
Hero Member
*****
Offline Offline

Activity: 672


BitLotto - best odds + best payouts + cheat-proof


View Profile WWW
July 12, 2011, 03:41:54 PM
 #3

OR
https://blockexplorer.com/q/addressfirstseen/(putaddresshere)

*Next Draw Feb 1*  BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR
TOR2WEB
Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
joepie91
Sr. Member
****
Offline Offline

Activity: 294


View Profile
July 12, 2011, 11:24:25 PM
 #4

Um, no.

This script traces back an address, to find where a specific transaction originated (in this case someone was branching off 0.04 every time and who wrote it wanted to figure out where that originated).

What you linked just gives the first seen date for a specific address (aka the first transaction).

Entirely different things.

Like my post(s)? 12TSXLa5Tu6ag4PNYCwKKSiZsaSCpAjzpu Smiley
Quote from: hawks5999
I just can't wait for fall/winter. My furnace never generated money for me before. I'll keep mining until my furnace is more profitable.
bitlotto
Hero Member
*****
Offline Offline

Activity: 672


BitLotto - best odds + best payouts + cheat-proof


View Profile WWW
July 12, 2011, 11:29:51 PM
 #5

Um, no.

This script traces back an address, to find where a specific transaction originated (in this case someone was branching off 0.04 every time and who wrote it wanted to figure out where that originated).

What you linked just gives the first seen date for a specific address (aka the first transaction).

Entirely different things.
ohhhh I mis-read what it does.  Embarrassed Cool!

*Next Draw Feb 1*  BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR
TOR2WEB
Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!