Change In File Mime Type – My PHP Story

I shared previously how I easily downloaded all images in a webpage without having to individually download each image. I got inspired by it and I decided to build a simple web tool using PHP that scrap and download and archive all images found in a specified webpage in ZIP format. It isn't production ready yet as it's still in Alpha stage. While building the tool, I discovered a mistake by me which added a newline /n after the image name … [Continue reading]

Generating Website Screenshot Using WordPress API

Website screenshot in WordPress comment

I have always noticed that whenever I mouse over a commentator’s website URL while moderating comments, I am shown a screenshot of the website. Few days ago, I decided to use Google chrome inspection tool to inspect the screenshot html image code. Below is the code result; http://s0.wordpress.com/mshots/v1/http%3A%2F%2Ftech4sky.com?w=600 Changing the http://tech4sky.com encoded URL above to any other URL will generate a screenshot of that … [Continue reading]

How To Fix XAMPP – Error: Apache shutdown unexpectedly

Apache failed to start in Xampp

I have been using XAMPP as my developmental server for years now. I have come to love it simplicity and effectiveness which is why I still haven't use other alternatives like Wamp and EasyPHP. Few days ago, I started Apache on XAMPP and to my surprise it will run and stop and afterward displays the below error message; Error: Apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a … [Continue reading]

Bulk Download All Images In A Web-Page Via FireFox, Chrome, Opera

Save selected web page images - Firefox

My friend and I were googling for free high quality frame images to use for a Photo-album we were working on. We came across a website that had over 60 picture frames with no download link to download the archive. Downloading the images individually wasn't considered an option by us as it will be time sapping and boring. I am going to show us how to jump past the hurdle of downloading all images or multiple selected images found in a web page … [Continue reading]

MySQL Search and Replace to the rescue

MySQL Search and Replace WordPress plugin

I have been using Crayon Syntax Highlighter WordPress plugin since the inception of this blog. While examining the number of request made by this blog via Firebug, I discovered that Crayon Syntax Highlighter alone made over 5 GET request which I deem too much for a mere code highlighter. I finally decided to replace it with a light-weight alternative "Syntax Highlighter for WordPress" The hurdle I had to face next was, editing previously … [Continue reading]

Aptana Studio FTP Relationship With File Permission

666 file permission / chmod

If you are a regular visitor to my blog, you already know Aptana Studio is my favourite IDE. Today while using Aptana built-in FTP client, I discovered that whenever I create or download a file, the file always have a file permission of -rw-rw-rw- or chmod 666 I call this the Devil's CHMOD permission. Setting a file permission to 666 means all users can read and write but do not execute. This may pose a security threat to your website … [Continue reading]

How To Fix – Fatal error: Call to a member function fetch_object() on a non-object

How to capture and validate multi-value form data in PHP

When coding, it is always advisable you check code to make sure the syntax are correct as majority of bugs arises from it. If you are using an Integrated development environment (IDE) such as NetBeans, Dreamweaver or Aptana Studio, you are notified when there is (syntax) error in your code. While working on a CMS I was building for a client, I encountered this PHP / MySQL error; Fatal error: Call to a member function fetch_object() on a … [Continue reading]

Feedburner feeds not updating – A simple fix

Feedburner ping service website

I have been trying to cut down the amount of resources such as CPU usage consumed by my blog. When hosting your website on a shared web hosting, you need to maintain an equilibrium level of server resources consumption in other to prevent any distortion to other website hosted on same server as yours. My first bold step in reducing server resources consumption was hosting my WordPress blog feed on feedburner. I had a weird experience with … [Continue reading]