PHP Scripts

Content

Changelog
FileList
FloodProtect
SVFileLog
UserAgentParser
PHP Function Pack

This page contains PHP functions and PHP classes that can be used on your own website.

Did you like my page, one of my freeware applications or online tools?

Donate via PayPal and support the publishing of this free content with any amount you want quickly and easily.

Allow for the domain Gaijin.at the display of advertising in your ad-blocker and help in this way to preserve this page!

Read more about support options...

Changelog

Changelog is a PHP class for formatting changelogs in text format for output as HTML. The output is customizable with templates and placeholders.

The manual is available in English and German, the example and source code comments are in English.

The changelogs on the German software pages, e.g. for eToolz or WipeFile, will be generated with this class.

Changelog example page - also included in the download

Version 1.0, 115 KB, 7-Zip, Script License

Send feedback or request a feature

FileList

FileList displays the contents of a directory on a web page. Besides the file name, the file size and the time of the last modification of the file is displayed. Optionally, comments for files and folders based on the file name can be displayed. The file list can be sorted by name, size, modification time and comment. Two templates are included, which allow the display in a table or as a list.

FileList Professional extends FileList with some features like hiding arbitrary files and folders with regular expressions or the possibility to allow or deny access to certain files for a visitor with a single setting. Furthermore downloads via the FileList script to hide the location of files and a mechanism to prevent direct linking of downloads by making download links valid for a limited time. FileList Professional is available per e-mail for supporters only.

The manual is available in German, the example and source code comments are in English.

FileList (Professional) is also used for File Directory.

FileList example (table) or FileList example (list) - also included in the download

Version 3.0, 131 KB, 7-Zip, Script License

Send feedback or request a feature

FloodProtect

FloodProtect is a PHP class that can be used to prevent the excessive use of a website or other resource. For this purpose, the script checks if too many requests are sent from one IP address within a certain time. Based on this result, the own script can deny access or trigger another action.

The manual is available in English and German, the example and source code comments are in English.

FloodProtect live demo - also included in the download

Version 1.0, 104 KB, 7-Zip, Script License

Send feedback or request a feature

SVFileLog

SVFileLog (Separated Value File Log) is a PHP class for creating tabular log files. The individual fields of an entry are separated from each other with separators, similar to CSV files or TSV files. This allows the logs to be opened with a spreadsheet program or a further processing with a script.

The manual is available in English and German, the example and source code comments are in English.

SVFileLog example log (plain text file)

Version 1.0, 113 KB, 7-Zip, Script License

Send feedback or request a feature

UserAgentParser

UserAgentParser is a PHP class for analyzing user agents. The individual information is provided in an array.

The manual is available in English and German, the example and source code comments are in English.

UserAgentParser live demo - also included in the download

Version 1.0, 87 KB, 7-Zip, Script License

Send feedback or request a feature

PHP Function Pack

This collection contains several PHP functions that are used in the same or a similar way on Gaijin.at.

Included functions
FormatFileSize
This function returns a formatted text with bytes, KB, MB and GB for a given file size. Depending on the format, the value "12345" can result in "12,1 KB" for example.
GetPreferredLanguages / GetMostPreferredLanguage
The function "GetPreferredLanguages" returns an array with the visitor's preferred languages based on his browser settings.
The function "GetMostPreferredLanguage" returns the visitor's most preferred language based on his browser settings. This function can also return a preferred language, that match a supported language. If you have a website that supports multiple languages, you can use this function to determine the most preferred language for your visitor.
GetTimeString
This function returns a formatted text with days, hours, minutes and seconds for a given number of seconds. Depending on the format, the number "63" can result in "1 minute 3 seconds" for example.
Whois / WhoisAsString
The function "Whois" sends a whois query to a whois server and returns the result as array.
The function "WhoisAsString" sends a whois query to a whois server and returns the result as string.

The examples, function descriptions, parameter descriptions and source code comments are in English.

Version 2019-12-25, 5 KB, 7-Zip, Source Code License

Send feedback or request a feature

Did you like my page, one of my freeware applications or online tools?

Donate via PayPal and support the publishing of this free content with any amount you want quickly and easily.

Allow for the domain Gaijin.at the display of advertising in your ad-blocker and help in this way to preserve this page!

Read more about support options...


This website use cookies and process data. Information on data processing and the possibility of refusing it can be found in the privacy policy. Ok