Introduction

The link scanner function will allow you to automatically check some/all of the links in your database to make sure the URLs are still working and that they are following your rules for blacklist items and reciprocal links. This document will describe how to setup and run the link scanner through the LinkX control panel.

Viewing Scanner Configurations

To view the scanner configurations that have been created, access the Directory > Links > Scan Links function from the control panel menu. This will display a page where you will be able to see all of the scanner configurations that are currently defined.

In the table that displays the scanner configurations, you will find several functions that you can run on each configuration. Each of those functions are described below. In addition to running these functions on single configurations, you can also delete several configurations at once. To delete several configurations at once, put a check in the checkbox next to the configurations you want to delete, then press the Delete button at the bottom of the page.

Starting/Stopping the Scanner

The link scanner requires that your server have the CLI (command line interface) version of PHP installed in one of the common binary directories. If LinkX is unable to find the CLI version of PHP on your server, you won't be able to use the link scanner. In this case you should contact your server administrator and ask them to install the CLI version of PHP for you and/or make sure it is placed in one of the common binary directories on the server (/bin, /usr/bin, /usr/local/bin).

On some servers it may not be possible to start the link scanner through the LinkX control panel. If your server's PHP installation is running in safe mode or has the exec() function disabled you will not be able to start the link scanner through the LinkX control panel. In that case, please see the alternate scanner starting methods for possible workarounds.

The link scanner will run as a background process on your server, so you may need to confirm with your server administrator that you are allowed to run background processes.

To start the link scanner, first locate the configuration you want to run and make sure the status shows that it is Not Running. You can then click on the icon to start the link scanner. You will be asked to confirm that you want to start the scanner, and if you select ok the process of starting the scanner will continue. A confirmation box will appear to let you know that the process has been completed, and you should now see the Status value updated with the current progress of the scanner.

To stop the link scanner, first locate the configuration you want to stop and make sure the status shows that it is scanning links. You can then click on the icon to halt the scanning process. It may take a few minutes for the scanner to stop, so during that time it is normal for the Status to still show that the scanner is working.

Adding a Scanner Configuration

To add a new scanner configuration access the Directory > Links > Scan Links function from the control panel menu. This will display your scanner configurations that have been created. Near the top of the page in the header bar that reads "Link Scanner Configurations" click on the icon. This will display a popup window where you will be able to enter the settings for the scanner configuration that you want to add. Each of the form fields are described below. You will also have the option to select what action will be taken for links that are found to be no longer working or breaking your rules. The available actions are described below. A different action can be set for each type of issue that the scanner encounters with the link. Each of the issue types are described below. Once you have filled in all of the fields as you want them, press the Add Scanner Configuration button. This will add the new configuration to the database, and you will be able to immediately run the link scanner using this configuration.

Editing a Scanner Configuration

To edit a scanner configuration you will fist need to locate it through the Link Scanner Configurations interface. When you locate the configuration you want to edit, click on the icon to bring up the editing interface. This interface is nearly identical to the scanner configuration creation interface, and has the same form fields with the same properties. You can make the changes that you want, and then press the Update Scanner Configuration button to save your changes.

Deleting a Configuration

To edit a scanner configuration you will fist need to locate it through the Link Scanner Configurations interface. When you locate the configuration you want to delete, click on the icon, which will ask you to confirm the deletion.

You can also delete several configurations at once by putting a check in the box next to the configurations you want to delete, then pressing the Delete button at the bottom of the page.

Alternate Methods for Starting/Stopping the Scanner

If you are not able to start the link scanner through the control panel, there is currently one alternate method to run the scanner. This requires that you have shell access to your server and are comfortable working with the server's shell environment. You can login to your server using your favorite shell access software. Once logged in, change into the admin directory of your LinkX installation and issue the following command: php scanner.php CONFIG_ID >/dev/null 2>&1 & You will need to replace CONFIG_ID with the ID number of the configuration you want to run (ID numbers are enclosed in [] before the configuration identifier in the Link Scanner Configurations interface). This command will start the scanner running in the background, and you will be able to monitor it's status through the LinkX control panel. Depending on your server, you may need to stay logged in during the entire time the scanner is running; logging out may terminate the scanner process. To prevent this you can use the nohup program if it is available on your server. In that case you can use this command to start the scanner: nohup php scanner.php CONFIG_ID >/dev/null 2>&1 & You should be able to logout after executing this command, and the scanner will continue to run.