Skip to content

Instantly share code, notes, and snippets.

odan /
Created Jun 1, 2021
Sign SOAP messages with xmlseclibs

Sign SOAP messages with xmlseclibs


  • PHP 7.4+
  • OpenSSL

Generating Public and Private Keys

First we have to create a private key for signature creation, and a public key for verification.

odan /
Last active Jul 8, 2022
Nginx and PHP Setup on Windows

Nginx and PHP Setup on Windows

For local development you could also use Nginx with PHP as an replacement for XAMPP.

Install Nginx


Slim 4 - Server Setup Diagnostic

The url has changed:

odan / httpd-xampp.conf
Created Dec 5, 2020
XAMPP with PHP 8 - Apache settings
View httpd-xampp.conf
# XAMPP settings
<IfModule env_module>
SetEnv MIBDIRS "/xampp/php/extras/mibs"
SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
SetEnv PHPRC "\\xampp\\php"
odan /
Created Dec 3, 2020
Slim 4 - Creating ZIP files in memory

Creating ZIP files in memory

composer require maennchen/zipstream-php --ignore-platform-reqs
    $options = new \ZipStream\Option\Archive();

 // Disable output of HTTP headers
odan /
Last active Feb 16, 2022
Generating UUID v4 in MySQL

Generating UUID v4 in MySQL

      # 1th and 2nd block are made of 6 random bytes
View User Authentication

User authentication system

Your task is now to create a user authentication system.

This document will guide you through all the features and implication of such system, so that you don't have to search them yourself.

We will focus on web/browser-technologies, however similar concept can be widely applied. This guide, is a work in progress, feel free to comment and provide feedbacks.

Expected Workflows

View TypeInspector.php
namespace App\Utility;
use DomainException;
use ReflectionClass;
* Type inspector.
odan / Slim 4
Last active Jan 15, 2022
Slim 4 Tutorial
View Slim 4