Archive

Posts Tagged ‘php’

How to install PHP Pecl GeoIP on Linux

April 28th, 2011

If you are a webmaster and want to include php GeoIP functions in your code. Then you have to install Pecl GeoIP extension on your server. After installing this extension you can get geo data of any IP-address using geoip_record_by_name function. To install this extention follow these steps

Read more…

Author: Categories: Linux, Web Development Tags:

Convert Alphanumeric into Decimal using php

April 27th, 2011

In my previous post about Convert Decimal into Alphanumeric using php you can find the php code to convert any large decimal number in small case sensitive alphanumeric string. Which is very useful for creating random user id or for url shortening script while keeping the length of id small and unique. In this article you will find the php code to reveres it means alphanumeric into decimal. Read more…

Author: Categories: Programing Tags:

How to add noindex, follow meta to wordpress tag page

April 25th, 2011

After google panda update most of wordpress users are deleting duplicate and low quality pages from google index. These pages includes tag pages and search pages. To remove these pages from  Google index. You have to add <meta name=”googlebot” content=”noindex,follow” /> in head. To add it only in tag and search pages Read more…

Author: Categories: SEO and Marketing, Web Development Tags: ,

Calculating Difference Between Two Dates Using PHP

July 12th, 2009

Calculation of difference between 2 dates is not an easy task so I m writing a function which do this job easily. This function is useful for calculate age of person by DOB (date of birth) or calculating age of record in databse
Read more…

Author: Categories: Programing, Web Development Tags:

Convert Decimal into Alphanumeric using php

July 6th, 2009

A Problem occurred when I was writing a script for shortUrl redirection. That using 5 Digit decimal numbers can cover only 105=100000 Urls but 5 digit alphanumeric (case sensitive) numbers are able to cover 622=916132832. So it is very helpful to keep Urls short.

Example

  • Using Decimal http://surl.bz/0 to http://surl.bz/99999 only 100000 Urls In 5 Digit
  • Using alphanumeric http://surl.bz/0 to http://surl.bz/ZZZZZ 916132832 Urls that’s Great choice

Read more…

Author: Categories: Programing, Web Development Tags:

Get rid of mysql sleep process/connections

May 13th, 2009

Some times there are many many sleep processes in your SQL connection. These sleep connections consume a lot of resources (RAM, cache and processor). This can cause you mysql server slow down. If your mysql server is not responding then the query to the database will take a lot of time. In such situations, your website will open very slowly.

This is really frustrating for webmasters. Here, I will show you how can you get rid of these sleep processes. Read more…

How to reduce the load time of your website

May 10th, 2009

Does your website take too much time to load? The load time of your website could be a crucial parameter that makes it impressive and useful for its end users.

Normally the websites with too many graphics and heavy designs take long time to load. However, sometimes even simple and light weight  designed websites take exceptionally long time to load.

While there are many factors that contribute to the load time, one important factor is the SQL performance. If your website uses a very big database and there are many DB queries then this too contributes to the long load times.

In this case you have 2 tricks to enhance the performance of your website:

  1. Enable Mysql query Cache
  2. Or Install APC Cache

Read more…