Simple URL Rotator

PHP Script to Rotate Your URLs

Configuration

PARAMETER_PASSTHRU (default: false)
If set to ‘true’ the query string when calling the ‘rotate.php’ is copied and attached to the redirection URL. For instance if you open the URL ‘http://your.server/rotate.php?page=1' it will redirect to ‘http:/redirection.url/?page=1’/. The ‘?page=1’ will be copied in this case.
VIEW_COMMAND_ENABLED (default: true)
If set to ’true’ and you call the ‘rotate.php’ with the ‘?view’ query string (as ‘http://your.server/rotate.php?view') then it will display a list of all the URLs in your ‘urls.txt’ configuration file. No redirection will be performed.
URLS_FILENAME (default: DATA_PATH . '/urls.txt’)
The full path and filename of the file that includes a list of URLs. One URL per line.
POSITION_FILENAME (default: DATA_PATH . '/position.txt’)
The full path and filename of the file that will be used to remember the sequence (position) of the rotator.
ERROR_LOG_ENABLED (default: true)
If set to ’true’ a log file will be maintained. One error log message per line.
ERROR_LOG_FILENAME (default: DATA_PATH . '/error.log’)
The full path and filename of the error log file. This will only be used if the option ERROR_LOG_ENABLED is set to ‘true’.
ACCESS_LOG_ENABLED (default: false)
If set to ‘true’ an access log file will be maintained. This file will include a timestamp, IP address, HTTP_REFERER, position and redirection URL for each visit.
ACCESS_LOG_FILENAME (default: DATA_PATH . '/access.log.csv’)
The full path and filename of the access log file. This will only be used if the option ACCESS_LOG_ENABLED is set to ‘true’. The contents of the file will be written in CSV format for convenient importing in your spreadsheet or database for further traffic analysis.
DEBUG_MODE (default: false)
If set to ‘true’ debug mode will be enabled. During debug mode all kinds of useful information is displayed. No redirection is performed.