diff --git a/README.md b/README.md index 46350b7..6c0608d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ coinwidget.com ============== -*The Bitcoin and Litecoin Donation Button* +*The Bitcoin, Litecoin, Franko Donation Button* Visit http://coinwidget.com/ for full documentation, demo, and a link code wizard. @@ -15,17 +15,18 @@ Donations are welcome and will go towards further development of this project as BTC: 122MeuyZpYz4GSHNrF98e6dnQCXZfHJeGS LTC: LY1L6M6yG26b4sRkLv4BbkmHhPn8GR5fFm + FRK: FNHGjAavM3RPqFZ4h3YEqT4uoNxENoY7MX *Thank you for your support and generosity!* Installation ============== -A. Grab the latest version from GitHub: https://github.com/scottycc/coinwidget.com +A. Grab the latest version from GitHub: https://github.com/franko-org/coinwidget.com-with-franko-support B. Open **widget/coin.js** and find: - source: 'http://coinwidget.com/widget/' + source: 'http://frankos.org/widget/' C. Change the URL portion of this line to your own server/path. diff --git a/coin.js b/coin.js index e3b4b30..b1f7c63 100644 --- a/coin.js +++ b/coin.js @@ -3,6 +3,7 @@ Donations welcome: BTC: 122MeuyZpYz4GSHNrF98e6dnQCXZfHJeGS LTC: LY1L6M6yG26b4sRkLv4BbkmHhPn8GR5fFm + FRK: FE35Ez4oq8jVfEaKJAHTugkkwzVVhuLxVZ ~ Thank you! ------------ @@ -48,7 +49,7 @@ var CoinWidgetCom = { } , validate: function(config) { var $accepted = []; - $accepted['currencies'] = ['bitcoin','litecoin']; + $accepted['currencies'] = ['bitcoin','litecoin','franko']; $accepted['counters'] = ['count','amount','hide']; $accepted['alignment'] = ['al','ac','ar','bl','bc','br']; if (!config.currency || !CoinWidgetCom.in_array(config.currency,$accepted['currencies'])) @@ -329,4 +330,4 @@ var CoinWidgetCom = { CoinWidgetCom.init(); } } -}; \ No newline at end of file +}; diff --git a/icon_franko.png b/icon_franko.png new file mode 100644 index 0000000..9c7414a Binary files /dev/null and b/icon_franko.png differ diff --git a/lookup.php b/lookup.php index 7515d4e..ea05068 100644 --- a/lookup.php +++ b/lookup.php @@ -5,6 +5,7 @@ Donations welcome: BTC: 122MeuyZpYz4GSHNrF98e6dnQCXZfHJeGS LTC: LY1L6M6yG26b4sRkLv4BbkmHhPn8GR5fFm + FRK: FE35Ez4oq8jVfEaKJAHTugkkwzVVhuLxVZ ~ Thank you! MIT License (MIT) @@ -50,6 +51,9 @@ case 'litecoin': $response = get_litecoin($address); break; + case 'franko': + $response = get_franko($address); + break; } $responses[$instance] = $response; } @@ -83,6 +87,20 @@ function get_litecoin($address) { return $return; } } + + function get_franko($address) { + $return = array(); + $data = get_request('http://frk.cryptocoinexplorer.com/address/'.$address); + if (!empty($data) + && strstr($data, 'Transactions in: ') + && strstr($data, 'Received: ')) { + $return += array( + 'count' => (int) parse($data,'Transactions in: ','
'), + 'amount' => (float) parse($data,'Received: ','
') + ); + return $return; + } + } function get_request($url,$timeout=4) { if (function_exists('curl_version')) {