This is a quick post to announce the release of Bitcoin Helper 0.11. Bitcoin Helper 0.11 contains significantly better error handler than the initial release (0.1) and also makes the file-based caching of the JSON retrieved from bitcoincharts.com mandatory.
Error Handling
It can now handle internal issues with network communication to the data source and incorrect JSON formatting of retrieved data. Bitcoin Helper 0.11 also checks to ensure the requested ISO 4217 currency code, for conversion to Bitcoin, is supported.
Certain functions in Bitcoin Helper now return a negative integer in the case that an error occurs. Details regarding these error codes can be found in the source code comments of bitcoin_helper.php. The relevant section of commenting is quoted below for convenience.
/* Information about error codes
Certain functions within Bitcoin Helper (0.11 onwards) will return
numeric error codes in the case of unexpected error or failure.
You should make sure to check the returned value for error codes
(intergers less than zero) in your code. The following reference
shows the error numbers and an explanation.
* -1 = Network error retrieving data from bitcoincharts.com
* -2 = Error decoding JSON data retrieved from bitcoincharts.com
* -3 = Currency code not supported
* -4 = Could not write to cache file – check permissions!
*/
File-based Caching
Bitcoin Helper 0.1 would cache the JSON containing currency exchange rates to a file if possible. This caching is now a requirement as of Bitcoin Helper 0.11.
Bitcoin Helper will attempt to write a file named ‘bitcoin_weighted_prices.json’. If this file is not writeable, you will receive error code -4.
If you receive this error, you will need to alter the permissions of the directory to allow this file to be created. Once created, you can revert the directory permissions if you desire and make only the individual ‘bitcoin_weighted_prices.json’ file writeable.
Download Bitcoin Helper 0.11
To download Bitcoin Helper 0.11 with improved error handling, please go to the Bitcoin Helper project page.
Make a comment
Over the past few months, I’ve gained quite an interest in the crypto-currency Bitcoin. Bitcoin is a new currency which has no physical form, but can be considered Internet cash. If you want more information on Bitcoin in general, take a look at the We Use Coins website, which has a great introductory video and [...]
Although this is old news, I should mention that Spotify is available for Linux natively. I’ve written about Spotify on Linux before, however this focused on how to get Spotify links working in Linux, when utilising the the Windows version of Spotify via Wine (a Windows compatibility layer for Linux). As of mid July last [...]
This is a report about what it will be like in ‘the future’, when we will be reading news from our computer. This is ‘newspapers by computer’. It is truly awesome to see how far we have come in terms of the Internet and networking computer communication. It is also slightly amusing to see how [...]
They are. Or at least, it can really help to assume they are. A short while ago, I read this from Alex Yumashev’s Jitbit blog: I just overheard this conversation between two developers at a co-working site: “I plan [on] creating a prototype for my new XXXX application, whatcha think it should be – a web-app, [...]
I’ve recently exchanged e-mails with a colleague regarding the storage of PHP sessions data in a MySQL database. To help anyone else interested in using database storage of PHP session information, I have paraphrased / rewritten the content of some of those e-mails below. One of the best ways to implement the database storage of PHP session [...]
After defeating the two greatest Jeopardy! champions of all time, the technology behind Watson will now be applied to some of the world’s most enticing challenges. Watch a breakdown of the match from Ken Jennings, Brad Rutter and the IBM team members as they look toward the future. Want more information? IBM’s Watson AI software
Watson is an artificial intelligence program developed by IBM designed to answer questions posed in natural language. Named after IBM’s founder, Thomas J. Watson, Watson is being developed as part of the DeepQA research project. The program runs on POWER7 processor-based systems. In 2011, Watson competed on the television quiz show Jeopardy! as a test [...]
Intelligence is a term describing a property of the mind including related abilities, such as the capacities for abstract thought, understanding, communication, reasoning, learning, learning from past experiences, planning, and problem solving. The Study of Intelligence Intelligence is most widely studied in humans, but is also observed in animals and plants. Artificial intelligence is the intelligence [...]
I’m a huge fan of reddit, the social bookmarking/community website found here. One of the features you have as a registered user is to save threads. I feel like a completely moron but I’d never been able to find out where these saved threads were listed until today, when I looked it up. Apparently I [...]