0 comments / June 24, 2015

http_host server_name difference

To get a domain name in php, we use http_host or server_name variables. But what is the difference between http_host and server_name and which one will return more accurate results?

1 comments / February 26, 2015

Remove non printable characters in string - php

We can remove non printable characters in string by using preg_replace function in php, It's quite simple.

0 comments / February 21, 2015

Calculate number of days in a month php

This simple function will return number of days for given month in php

0 comments / November 11, 2014

Remove last character from string trick in php

General way of trimming last character of string in php is using substr function. But there is another way we can do it using rtrim().

0 comments / July 24, 2014

Solved: xampp new security concept issue

When I try to access phpmyadmin after installing xampp in my linux system, I stuck with this error: New XAMPP security concept: Access to the requested object is only available from the local network. This setting can be configured in the file "httpd-xampp.conf".

5 comments / July 11, 2014

PHP Email Validation - SMTP, MX Record and Regular Expression

We sometimes need to validate the integrity of given email id. The easiest way we have is just sending a verification mail to the given email id and asking the user to click on the link in that email. But other than that we have three more ways, that is, SMTP Email Validation, MX Record Check and Regular Expression&

0 comments / June 29, 2014

Convert text to image in php

Basic idea behind converting text to image is to avoid spammers grabbing important data like emails, phone numbers etc. This simple php script convert text to image dynamically, Just have a glance at this script.