Monthly Archives: January 2014

How to calculate age from a given birthdate in php

snippets

How to calculate age from a given birthdate in php? Has anyone needed to get the user age based on the profile birthdate? Well you probably thought about it now. It is possible to this and its user friendly to let someone know how old they are. Of course some of you may not want

How to generate random string in PHP

snippets

How to generate random string in PHP Have you ever needed to generate a random password from a given set of chars in PHP? You could also probably wanted a password salt used for encrypting the user password. Well here are two solutions which I can think of at the moment to help you generate

How to change php timezone on your server

Timezone map

How to change php timezone on your server Normally when using a shared hosting service, the server you are being hosted on has a different timezone set. So your scripts may be displaying a different time than what you expect. Fixing this is not hard at all, however some users think that the server timezone

How to fix mysql server has gone away error

How to fix mysql server has gone away error

How to fix mysql server has gone away error Today I thought about right something about this particular error which pops up in certain specific cases Mysql server has gone away I’ve seen this a couple of times on some of my clients and they all thought that this issue was a direct cause of

Improve website performance with Cloudflare

Cloudflare CDN

Improve website performance with Cloudflare Its been a while since my last article on website optimization, the reason for this is because I really haven’t made much changes on my site since long ago. Recently however I switched back to Cloudflare, thought of giving them a test again and it loads fast, I can’t really

How to get last key in an array in PHP

snippets

How to get last key in an array in PHP? Arrays can have lots of elements, some that may not be needed at one point. Let’s say that we need in some cases the last key or last element of an array in PHP, what would you do? A very good solution and clever practice

How to set apache server status using mod_status

Apache web server

How to set apache server status using mod_status What is apache server status? Normally only server administrators would have access to this section, they would look at this specific page to lookup more information on their current server activity in an easily readable form. The current information you can view from this page are: The

How to check if URL exists in PHP?

snippets

How to check if URL exists in PHP? Let’s say you want to check if an URL exists. You want to do that with PHP because that is what you know, and you want to perform some savings into the database if that URL exists. This can be done in various ways which will work

What is the best email marketing service for newsletters

Email marketing

What is the best email marketing service for newsletters What is the best way to describe email marketing? Is it good or is it bad? Will annoy people or will it help them? What are the best email marketing services for newsletters at the moment? These are just a few questions that I plan to

How to add element to array PHP

snippets

How to add element to array PHP If you are a programmer, you will need to work with arrays at some point, arrays are something referred to like a collection of elements. It is much easier to have an array with n number of elements, instead of having n number of variables. Problem Lets say

Request an article ←