Get weather information using php

Most of webmasters want to display weather information on their website. So I have decided to provide a tutorial to do this via PHP script.
There are tones of APIs that provides weather information like Yahoo weather, Open Weather Map, Accuweather, etc but my favourite is Open Weather Map. Lets start with OpenWeatherMap API.

Continue reading “Get weather information using php”

Backup and restore large mysql database

If you have very large mysql database then it is very hard to backup and restore using the conventional phpmyadmin or any other program ( like bigdump).

In this Tutorial I will explain you how to backup and restore a larger database ( having millions of rows). This tutorial can be used while moving your database from one server to another.

First you need to have shell (ssh) access to your server.You can use any free program like putty to connect your server Then follow the steps: Continue reading “Backup and restore large mysql database”

How to change Mysql data directory location?

Mysql is most famous open source RDBMS (Relational database management system) software used by millions of websites. Most of website with very large Mysql database experience storage problem because /var partition is to small which holds Mysql data files and folder by default. If you are experiencing such a problem then you have to move your Mysql data directory to other linux partition (eg: /home). To change your directory without affecting Mysql configuration. Follow these steps. Continue reading “How to change Mysql data directory location?”

PHP script to count Google backlinks and Indexed Pages

To get backlinks and indexed page count from Google most webmasters use scrapping Google search page. It is not a good idea because it fails some time and very slow.

So we can use Google Ajax search API instead of scrapping whole page. It will return data in JSON object which is much smaller then html page.
Although Ajax search API is rate limited to 100 queries per IP per Day but still it’s a good way. Continue reading “PHP script to count Google backlinks and Indexed Pages”