James John – Software Engineer

Archives

PHP

Simple PHP Mail Function Using Swift Mailer

Using the built-in mail() function is PHP is pretty cool but not cool if you’re sending bulk or large mails and secondly it always head for the Spam box 😀 because not all needed headers are there. But using a mailer, I use Swift Mailer and it’s cool for me, get Swift Mailer and also […]

Securing Your AJAX Call-up Pages – Advanced

AJAX is cool, makes it able for you to do multiple things on a page without reloading and creating extra pages but how secure can it be? You may wish to run some actions on an AJAX page and without security even GoogleBot in the act of crawling your page executes the action. AJAX requests […]

My First Newbie Python Program

Just started my Python class few days ago and it’s pretty cooler compared to PHP, I just got to notice that Python doesn’t like long codes it wants everything short and simple still compared to PHP. Stuffs like: PHP: Is shorter and simple in Python: Am not a pro yet, am just that newbie 😀 […]

Reducing Apache Memory Consumption – Process PHP with FastCGI

What is FastCGI? CGI are programme written to help the processing of Perl Language that has been written for the web and they also help the Web Server in processing requests and handling Webpages.

PHP Class: Online Guest Count System Using PHP

Here is what we’ve got here? A PHP Online Guest Class What Does This Do? This class saves any guest that visits your site saving some vital details about them, refreshing the time set and counting number of guests online How to Configure This: Firstly, set up your database connection by editing these lines of […]

Highlight PHP Codes with Line Numbers Using highlight_file () Function

PHP has an awesome function that highlights its own code, means you can highlight PHP codes using a function which is the PHP highlight_string () for string and highlight_file () for a PHP file. On using this function, the highlighted code never come with line numbers but in this post I’ll show you how I […]

Executing Commands through PHP (Linux & Windows)

Its amazing to see PHP interact with the Operating System, as we have Command Prompt in Windows and have the Terminal in Linux PHP can externally execute commands to it and return you the output or null if an error is found.

Why you should not use $_SERVER[‘REQUEST_URI’] and $_SERVER[‘PHP_SELF’]

Well, this might be a sad news for those who normally use 🙁 I once was a fan to it and use it quite well in form actions but realized that form actions can be null if its the same page. So i choose the easier one 😀

Interprete and Parse Meta Robot Values Using PHP

Hey reader, you really need to see this PHP meta robots parser? So damn easy, now lets get our hands dirty ;). Am writing a function that interprets the meta robots which receives arguments of strings (e.g noindex,nofollow), you can grab this with the get_meta_tags() function then let me start the function to parse this.

How to Validate Nigerian Phone Number Using PHP

I was on a project that an SMS is required to be sent to a subscriber which must be a Nigerian Mobile Number in other to manage their SMS Units, that is what led me into writing a function to validate Nigerian phone numbers.