HS Banner
HS Codebank Articles
Page 1 of 2

List All Files in a Directory Using PHP 04/05/2022

Description:

In PHP there are several ways to get a list of files in a PHP application.

Author: Admin
Language: PHP
Tags: list files directory php glob scandir opendir readdir closedir filesystemiterator
Read More18

Securing Session INI Settings for PHP 02/17/2022

Description:

By securing session related INI settings, developers can improve session security. Some important INI settings do not have any recommended settings. Developers are responsible for hardening session settings.

Author: Admin
Language: Plain Text
Tags: php manual cookie securing session
Read More44

Predefined PHP Variables 01/17/2022

Description:

PHP provides a large number of predefined variables to all scripts. The variables represent everything from external variables to built-in environment variables, last error messages to last retrieved headers.

Author: Admin
Language: PHP
Tags: php
Read More53

PHP whois lookup Class 12/05/2021

Description:

This is a standalone php class to find whois information of a domain or IP.

Author: Guitarman
Language: PHP
Tags: php
Read More105

Example of .htaccess for PHP 10/06/2021

Description:

A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, used for configuration of website-access issues, such as URL redirection, URL shortening, access control (for different web pages and files), and more. The 'dot' (period or full stop) before the file name makes it a hidden file in Unix-based environments.

Author: Admin
Language: HTTP
Tags: html
Read More79

Escaping from HTML 05/16/2021

Description:

Escaping from HTML in PHP

Author: Guitarman
Language: PHP
Tags:
Read More84

Detect a robot/spider. 05/16/2021

Description:

This is a simple pace of code to detect a robot/spider in your PHP website.

Author: Guitarman
Language: PHP
Tags:
Read More73

PHP Filesystem Security 04/03/2021

Description:

Anyone learning PHP should read this and the rest of the security section in the PHP manual.

Author: Admin
Language: PHP
Tags:
Read More64

PHP gzcompress 03/25/2021

Description:

This function compresses the given string using the ZLIB data format.

Author: Admin
Language: PHP
Tags:
Read More55

Get and format date in PHP 03/20/2021

Description:

date() Returns a string formatted according to the given format string using the given integer timestamp

Author: Brian Henry
Language: PHP
Tags: cs
Read More65

Submit Your Code

If you would like to share your code on HS Codebank you can submit it using the contact page, email, or by registering and clicking the submit article button.
Register Contact Us

Apache Config
Bash
C
C#
C++
CoffeeScript
CSS
Diff
GO
HTML, XML
HTTP
Java
JavaScript
JSON
Kotlin
Less
Lua
Makefile
Markdown
Nginx Config
NSIS
Objective-C
Perl
PHP
Plain Text
PowerShell
Properties
Python
Python REPL
R
Ruby
Rust
SCSS
Shell Session
SQL
Swift
TOML, also INI
TypeScript
VB Script
Visual Basic .NET
YAML
Request New Language