Dynamic Bitcoin prices on any site!

  Main    Demo    Payment    Info   

On this site you can download a script that will automatically show the value of any goods or services on your site in Bitcoin, originally listed in euro, Fed dollar or yuan. Recalculation occurs at the rate of exchanges BTC-E, Bitstamp, or Huobi, by pressing the "Convert to Bitcoin".
Data are updated automatically, specify the search interval, and you will not survive that course could change dramatically in the time when you set prices.
The script allows the Commission to take into account inherent in the currency conversion.


1000 euro = 1000 euro


How to install the script on your site (Push Me!):
1. Download the archive script (there will be some files: 3 php-file to parse the exchange rate from the exchanges (BTC-E, Bitstamp, Huobi), js script, CSS file, and this manual).
2. Select the source of exchange (ie - exchange) and download the appropriate file parser quotations in the root folder of your site.
For Exchange BTC-E.com it will vp-btce.php, for Bitstamp.com - vp-bitstamp.php, vp-huobi.php for Huobi.com.
3. Configure script of replacement - file scrypt.js (you help - comments in the code - they are after the double slash (//) in each desired row ).
Line 26 - list the source of your site currency (ie the currency of which it is necessary to recalculate in bitcoin).
Line 29 - Set Exchange (or rather - a link to the file Purser Exchange. For reliability, you can specify an absolute path, for example : var url_parser = "http://yoursite.org/vp-btce.php", instead : var url_parser = "vp-btce.php".
Note that:
- Fed up of the dollar in bitcoin prices can be translated at BTC-E or Bitstamp.
- Euro is considered on the basis of the internal rate Fed Dollar / euro at the exchange Bitstamp.
- Yuan translated at Huobi exchange.
In line 30 the name of the object class is defined, where the price will be changed. Refresh interval data in milliseconds - specified in row 31.
Line 32 allows you to run automatically recalculated in bitcoin. If var auto_run = true; (and not "false") prices will in bitcoin immediately with the download page.
4. In the page code, which must be done counting, place the contents of this file (scrypt.js) right after the first tag <body>.
5. In the page header (between <head> and </head>), which should be done counting, put the following line:<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
6. In file CSS (which describes the design of your pages required), add the file contents style.css, customizing the look "buttons" switching rates (originally id - "start_convert" and "restart_convert"). In accordance with the design of your site.
7. Your sсript integrated into the pages.
Now, for what would a computer - or rather, the user's browser, it was clear where the values should be overwritten, all recounts the original price in the code pages must be placed (if they have not been placed there) in <span> (or other) tag with class "price", as in the example:

was (in the code): Price: 1000 euro
become (in the code): Price: <span class="price"> 1000 euro </ span>
8. !!! Ensure that users see that the price listed is in bitcoin, and not clear in what is placed in a tag <span> need and the number of the currency and that it too would be replaced!
9. If you have a lot of places where it is necessary to replace the value and price indication being used by another class, not the class "price", you can assign the correct class in the script, line 23 of the source file scrypt.js.
10. That would take into account the additional costs inherent in conversion (input and output) rates, add the appropriate amount of additional cost coefficient in the 12 line of the file scrypt.js (10% - 1.1, 20% - is 1.2, etc.):
was: new_val = (old_val / kotirovka). toFixed (3);
become: new_val = (old_val / kotirovka * 1.1). toFixed (3);


IMPORTANT: The script assumes informational purposes only! Check the exchange rate at the final transactions!

The sources of data for parsing, which uses a script to change, which can make the script incorrect!

The sources of data for parsing, which uses the script may not depend on its creators amendments that may affect its operation! Tell your e-mail address below for timely notifications !

Important! Rates in EURO at the exchange Bitstamp calculated based on the exchange rate of Fed dollar / EURO on the same exchange.

Script code can and should be used to create modules with Similar goals.
If you are developing a similar script yourself - inform, will together lead download statistics.

If you wish to receive information about changes in the script and data sources, please let know:


name: e-mail: site:


2ox@inbox.ru - site and the idea  [ GitHub ]  script code - seorubl@yandex.ru