HS Banner
HS Codebank Articles
Page 1 of 2

Add a new item to an array, it can be inserted with the help of array_splice() a function of PHP. 09/09/2023

Description:

This function removes a portion of an array and replaces it with something else. If offset and length are such that nothing is removed, then the elements from the replacement array are inserted in the place specified by the offset.

Author: Admin
Language: PHP
Tags: array php insert array_splice
Read More

Use Sockets to send and receive data over TCP 05/07/2023

Description:

When working with System.Net.Sockets, you represent a network endpoint as an IPEndPoint object. The IPEndPoint is constructed with an IPAddress and its corresponding port number. Before you can initiate a conversation through a Socket, you create a data pipe between your app and the remote destination.

Author: Admin
Language: C#
Tags: sockets send receive tcp cs
Read More

Unique Random Numbers Within a Range 04/23/2023

Description:

Here's a nice function I found to get 10 unique numbers from a range of numbers.

Author: Admin
Language: PHP
Tags: random numbers range php
Read More

PHP Shuffle 09/11/2022

Description:

Randomizes the order of the elements in an array.

Author: Admin
Language: PHP
Tags: php shuffle array
Read More

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 More

Bad Word Filter 02/26/2022

Description:

Here's a filter you can use to remove bad words from user submitted data.

Author: Admin
Language: PHP
Tags: php bad word filter
Read More

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 More

TcpClient Class 04/01/2021

Description:

This is a class I've used on a network chat program I built.

Author: Guitarman
Language: C#
Tags:
Read More

Find missing numbers in a sequence. 03/29/2021

Description:

Returns the missing numbers in a sequence.

Author: Admin
Language: Visual Basic .NET
Tags:
Read More

Get Json String From URL 03/25/2021

Description:

Get Json string from url and convert to DataTable.

Author: Admin
Language: JSON
Tags:
Read More

Submit Your Code

If you would like to share your code on HS Codebank you can submit it by registering and clicking the submit article button on this page.
LoginRegisterContact Us

List of Supported Languages
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