Load and execute SQL files with PHP
How to load a SQL query from a file instead of having an inline query. This is done to help with formatting and easier understanding of the code. All that…
How to load a SQL query from a file instead of having an inline query. This is done to help with formatting and easier understanding of the code. All that…
Effectively manage PHP MySQL inserts from a large loop using the PDO connection. The key is to avoid committing data on each loop, this is done using a transaction. Use…
How to enable the GD image library for PHP 8 with XAMPP on Windows. All that’s needed is a simple php.ini file edit. Enable GD PHP 8 XAMPP To enable…
A shortcut method to quickly creating dynamic Chart.js bar charts using PHP and data from a MySQL database. This blog post is for a single Y-axis bar chart. Gist link….
Efficiently load and read from large files in PHP with the built-in SplFileObject class. fopen() becomes very slow and bogged down once the file size starts getting above a couple…
SQLite is a serverless, self-contained database that in practice works straight out of the box. With no need to install or run to access and use. The SQLite library is…
A method to easily and quickly find what php.ini configuration file is loaded and in use. The php.ini file holds all of the configuration values for your PHP installation. It…
Manually calculate the bitrate of a video from its file size and length. This can be done for both Megabits per second and Kilobits per second. Bitrate is the number…
Using the Yahoo finance stock API to firstly get stock ticker symbols and then the stock price with PHP. The Yahoo finance API is a fast and free method to…
How to disable normal username/password login authentication to your Ubuntu server, only allowing SSH key authentication. This gives you the advantages of SSH’s whilst securing your server that little bit…