Every project should have regular backups. Writing database tables to a file using PHP while possible is not recommended, it's much better to use MySQL for that.
MySQL has a function called mysqldump that exports a database to a file, this is ran using SSH. For those times when you don't have access to SSH here is a simple way to create a backup using mysqldump by running exec and passing in the command and the login credentials and lastly defining the name of the file to be created.Continue Reading
Closures are really useful, especially for creating plugins when a full blown controller is not needed, today I came across a problem when using a closure within a class and trying to use $this-> which resulted in getting this error Using $this when not in object context.Continue Reading
Xbox does not provide an official API for anyone to use. Their are a few sites that provide an API one of which is https://xboxapi.com/v1 xboxapi makes it very easy to pull your Xbox API data.
In this tutorial I'll show you how to display your Xbox Live data and then cache it, this will enable the page to load faster and avoid going over xboxapi's API Limit which is set to 350 requests an hour.Continue Reading
Here is a quick way to read a csv file hosted remotely, download its contents and store it to a local csv file. Once the file have been saved open the file loop through the data and display it. Equally this can be used to import data into a database.
Perfect for a daily task by calling the script with a cron job.Continue Reading
Keep rows that would normally be lost when selecting rows using a COUNT and GROUP By. To keep say another column and merge them into a column comma separated by using a GROUP_CONCAT function.Continue Reading