My server has statistics generated by a server-side include command (SSI) or a php script. Because of the spider, these statistics are wrong. When Alkaline is indexing a page, how do I avoid executing ssi or php code?

With Apache, it is possible to define variables per user-agent connecting to the server. This is described in detail in http://httpd.apache.org/docs/howto/ssi.html#advancedssitechniques . Alkaline's user-agent is AlkalineBOT by default.

For server-side includes, add the following to your .conf file for your web site:
BrowserMatchNoCase AlkalineBOT Alkaline
This will define a variable Alkaline whenever the spider indexes the page.

Then add the following code around your ssi calls:
<!--#if expr="${Alkaline}" -->
 Alkaline will not see the code here
<!--#else -->
 everybody else will see the code here
<!--#endif -->

For php, use:
if (!preg_match("/AlkalineBOT/i", $HTTP_USER_AGENT))
{
 everybody, except Alkaline will see the code
}