James John – Software Engineer

Archives

PHP

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 Create Customized External Post Page in WordPress

How to Create Customized External Post Page in WordPress

Yea, am not that a WordPress fan or a good user but few months ago I was working with it and it was really cool, mainly I love working with backend so I decided to use some features of WordPress which led me into reading bulks of their docs and finally gave me something. Well, […]

PHP Security: Protecting Your PHP Projects From XSS Attacks

Its a year now when I was still a cool newbie in PHP thought am not yet expert now 🙂 I was coding something like a forum where users can post and other users can read and comment. I hosted the project and something just hit my head “What if a user posts <script>alert(‘hello’)</script> will […]

Working with Comma Separated Values in MySQL

One of my latest project I worked on was where I decided to use a feature that I saw in SMF Coding, that values are stored in a MySQL Database Column separated with Commas. Though I don’t know how to retrieve these values as at that moment but I was sure it will make my […]

Detect Real Client IP from Proxy Using PHP

Fetching out proxy users and exposing their real IP is what I really enjoy, I remember using Google Search in Opera Mini Mobile which uses its proxy to forward. But to my suprise, it got to know am in Nigeria and redirect me to .com.ng 😀 . So glad to find out PHP doing this, […]

Create a Fast Loading Dynamic PHP Site Using PHP Caching

Create a Fast Loading Dynamic PHP Site Using PHP Caching

Query not your database too much and leave it to rest, which will absolutely make your page load as fast as a local html file in your PC WHAT IS CACHING? This is the act of storing a data for future retrieval in a faster way. WHERE IS CACHING NEEDED? Well, I should say when […]

Check Every Year’s Easter Date Using PHP

Check Every Year’s Easter Date Using PHP

Hello there, was just surfing on PHP functions in their site and came accross this function and it works great! Though I don’t even know how the Easter is been calculated Below is the script, copy it to a PHP file and save or download the attachment: <?php function check_easter($year) {     $y = getdate(easter_date($year));     if($year<date(‘Y’)) {         $word = ‘was’;     }     else {         $word = ‘is’; […]

How to Use Proxy in PHP cURL

How to Use Proxy in PHP cURL

Hi there, below is a little snippet of what using Proxy in PHP cURL