How to get the Redeem Script for a P2SH Address From Private Key with PHP
Just a quick piece of code, that is using Bitwasp library to mare redeem script from private key
Just a quick piece of code, that is using Bitwasp library to mare redeem script from private key
Spent several hours today figuring out how to interact with an ElectrumX server, and it resulted into just several lines of code. I hope this will save someone time. I will show 2 versions – for TCP and SSL connection to ElectrumX server. Here is the TCP one: If you prefer to connect to your server with SSL… Read More »
Another script, that I had to create by myself, since I haven’t found a solution for such a simple task. Let’s say you create a multisig Bitcoin wallet in Electrum. Let’s start with a basic version where you have 2 signatures out of 2 possible, so you need to have both to send funds. You follow this guide… Read More »
Sometimes you might have small numbers in PHP. So small, that they are automatically converted to exponential format. In order to show them as numbers, here is the code: You’re done!
Today I’m coming with a setting for Yii2, as I haven’t found any documentation about this. So we will set up advanced template of Yii, on a Directadmin server, running on nginx. First of all, you need to install Yii2 – you can do it as you like, via composer or regular installation. This step is very well… Read More »
Inspired from Github If you have links, that might end with slashes (sometimes they are being added automatically), you won’t be able to handle them unless you add a string to your Yii2 project configuration. Since version 2.0.10 UrlManager can be configured to handle trailing slashes in a simple way. Just make sure your config file has normalizer… Read More »
Today just a simple command. If you need to know the current query for an Activerecord object, you need this simple command: This will show current SQL query. Another solution is:
Sometimes users need to send outgoing e-mails with external SMTP servers. Most popular example is PHPMailer with its ability to use free SMTP servers, for example Gmail. Here is the short piece of code, that allows to do this: If you have a Directadmin server with csf firewall installed, most probably you will get this message on execution:… Read More »
Sometimes you need to avoid using cURL for getting external web content for any reasons. You’re lucky that PHP has some built-in functions that allow you to get data from the Web without cURL. But if you are using default values, there is no option to set the timeout for a operation and it’s sometimes annoying. In order… Read More »
If you have used Hesk before, you must have mentioned that all links that were posted by users at the time of ticlet creation/reply were opening in new tabs. If you decide to update to 2.5.2 (I was using version 2.3 before), you will notice that all links will be opening in the current tab. If you want… Read More »