James John – Software Engineer

Archives

PHP

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.

How to Resolve “MySQL shutdown unexpectedly” in XAMPP

That moment you turn on your system which is currently running in Windows then you are unable to connect to http://localhost/phpmyadmin, you try starting your MySQL server but seeing this message MySQL shutdown unexpectedly.

How to Install cURL Module in PHP5 Ubuntu

I am a newbie to Ubuntu though, I was successful in installing Apache and MySQL(with PHPMyAdmin), now was enjoying my new OS but something wanted the cut off my joy with Ubuntu. I was writing some PHP codes that needs to work with cURL but unfortunately am getting this error message when I want to […]