File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/lib/server_stats/server_stats.php
<?php
/**
* This file sends anonymous stats about modules that a server has installed and versions of those modules.
*
* serverStats_Send will return an associative array with the options for you to use on your project. The
* array contain the following keys:
* InfoSent Boolean that tells if the information was sent through CURL or FOpen. If he information is
* sent properly, InfoSent is set to true. Otherwise, it is set to false.
* InfoQueryString String that contains the stats
* InfoImage String with an image tag to send the stats
* So if the info can't be sent through curl or fopen, you still have the options to put out an image (which
* you just need to include in your template somewhere) or store the data in any other way you may find
* convenient.
*
* Example:
* <code>
* require_once('server_stats.php');
* $sending = serverStats_Send(0, '', 'NX 1.3.2', 'WE');
* if ($sending['InfoSent'] === false) {
* $GLOBALS['InfoImage'] = $sending['InfoImage'];
* }
* </code>
*/
/**
* serverStats_Send
* Works out the modules you have installed and attempts to send the info across to the other server for recording.
*
* @param Mixed $installtype An install type of '0' is a fresh install. An install type of '1' is an upgrade. Or alternatively, pass in 'install' or 'upgrade'.
* @param String $prev_version The version the upgrade is from if applicable.
* @param String $current_version The new version for the upgrade or fresh install.
* @param String $product_name The name of the product that is being installed.
*
* @return Array An associative array with the following keys
* InfoSent Boolean If the info was sent through CURL or fopen
* InfoQueryString String The data to be collected from the server
* InfoImage Boolean The image tag with the data to be collected, like <img src='http://server-stats.info/blank.gif?".$string."' />
*/
function serverStats_Send($installtype=0, $prev_version='', $current_version='', $product_name='', $charset='')
{
return;
}
/**
* _serverStats_UrlOpen
* Opens the url passed in and returns the output that the url returns.
* Checks for curl support first and uses that if it's available.
* If curl support isn't available, then it tries to use fopen.
* If that's not available, it will return false.
*
* If curl fails, it tries to use fopen.
* If fopen fails, it returns false.
*
* @param String $url The url to 'open'.
*
* @return Mixed Returns false if you don't provide a url, or if the url can't be opened. Otherwise returns the data from the url provided.
*/
function _serverStats_UrlOpen($url='')
{
return;
}
/**
* _serverStats_CheckDocRoot
* Checks whether the document root is set up correctly.
* It will return false if there is no document root, or it's empty
* It will also return false if the current file (using __FILE__) is reportedly outside the server's document root.
* If all of that works out ok, this will return true.
*
* @return Boolean Returns true or false based on the built in checks.
*/
function _serverStats_CheckDocRoot()
{
return;
}
/**
* serverStats_ParsePHPModules
* Function to grab the list of PHP modules installed
*
* @return Array An associative array of all the modules installed for PHP
*/
function _serverStats_ParsePHPModules()
{
return;
}