PHP Find how many pages are Indexed by Google

Hi Guys,

Lately I have been giving undivided attention to my new born daughter so for writing lengthy how-tos, I am finding less time for. But that doesn’t mean that I am unable to share some quick how tos.

You see, that in many Browser Extensions and/or toolbars that give information on SEO stuff they list page indexed by various search engines such as Yahoo, Bing and Google. An example is shown below.

Indexed pages

This post shows you how to get that value from Google.

The PHP Code snippet

Here is a function that you can include in your utility class or just

Just in case above doesn’t work then you can try out a curl request such as the one shown below, you may need to check if google returns a “document moved” status. In that case you will have to copy whatever Google suggest to make it work.

Usage

Using the above function is quite simple and is shown below

This is not very pretty but there is no standard API that I am aware of doing the same.

In post to come we will be looking  “Find how many pages are Indexed by Bing using PHP”

Idea is the same but regular expression will be different.

I hope that this helps

Cheers.

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Comments

  1. Dear SIr,

    I want to check multiple url.

    Can you show me have to use while or foreach ?

    Please help me

  2. Otyan Mckiny says:

    WE’re taking 503 error , your php is not working…

Leave a Reply