PHP Script: Site Map with Number of Links Returned

Based on the CSV file, GWT and the content of the site establishes a hierarchical site map with the number of backlinks for each page.

The value that is considered is the second value of the table provided in Google Webmaster Tools: the number of links from different sites.

The pivot table, created by the script as an HTML file, allows you to assess the popularity of various types of pages on the site, depending on the number of links received.

Background:

The script itself does not require installation. After retrieving from the archive, to create a map, it starts with the command:

php backcount.php

If you have a site map file, the command:

php backmap.php 

But you need to create a backcount.ini file to enter information about your site, which is in two lines:

site=c:/example.com
map:sitemap.xml
csv=www-example-com_20140530_ExternalLinks_LinkedPages.csv

The first line indicates the root of the page storage space. The second is the local path to the site map. These two commands are alternative, backcount uses only the site and backmap uses the map.
The third is the path and name of the csv file. You can add multiple cv strings to compare evolution over time.

If you need to manage multiple sites, you can create an ini file for each.

At startup, the program asks for the name of the ini file. You can then enter a name or press Enter directly if you are using the default backcount.ini file.

You can skip the .ini extension, the program will add it for you.

The program then creates an HTML table in the file with the first name from the CSV file name. Site directories are in bold and follow the list of files they contain. Each row on the right contains the number of references returned.

Reading this table will clearly show which part of the site is most popular and which is not interesting to anyone, it is much easier than with the original list, classified by the number of backlinks and not specifying pages without any backlinks.
They can be canceled to improve the site's rating in search results... Look why "Panda's Algorithm" is clear.

Simplified use

In the latest version of the script in August 2015, you no longer need to give a list of CSV files, provided that they are placed in the same directory as backcount.php.

Just specify a common prefix for CSV files in the ini file. For example, if your site is www.example.com, the common prefix would be: www-example-com:

site=c:/example.com
prefix=www-example-com

Then follow the previous steps.

The backcount.zip archive contains Script source code and PHP executable code.

Versions

The CSV format is often used to create lists that can be exchanged between different programs. The above script uses simple functions, because it is limited to well-defined files, but if you want to use this format in your programs with files of different origins, specialized tools can be useful: