Skip to content

Instantly share code, notes, and snippets.

@milan-sahana
milan-sahana / get-vimeo-video-id-from-url.php
Created October 9, 2024 04:21
php - get vimeo video id from url
function getVimeoVideoIdFromUrl($url = '') {
$regs = array();
$id = '';
if (preg_match('%^https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\#?)(?:[?]?.*)$%im', $url, $regs)) {
$id = $regs[3];
}
// else
// {
// $id = substr($url,10,strlen($url));
// }
@milan-sahana
milan-sahana / postal-codes.json
Created June 14, 2024 11:24 — forked from jamesbar2/postal-codes.json
Global postal codes regex formats
[{
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup",
"Country": "Afghanistan",
"ISO": "AF",
"Format": "NNNN",
"Regex": "^\\d{4}$"
}, {
"Note": "With Finland, first two numbers are 22.",
"Country": "Åland Islands",
"ISO": "AX",
if(!class_exists('Database')) {
class Database
{
private $db_host = 'localhost';
private $db_user = 'daso_user1';
private $db_pass = 'pwd1';
private $db_name = 'daso_db1';
private $con = '';
public $lastQuery = null;
@milan-sahana
milan-sahana / users.sql
Created April 21, 2024 06:06
Unique Email id by GENERATED index
-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 21, 2024 at 06:00 AM
-- Server version: 10.6.16-MariaDB-0ubuntu0.22.04.1
-- PHP Version: 7.4.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
This file has been truncated, but you can view the full file.
0-180.com, 0-30-24.com, 0-420.com, 0-900.com, 0-aa.com, 0-mail.com, 0-z.xyz, 0.mail.mujur.id, 0.pbot.tk, 00.pe, 000000pay.com, 00043015.com, 000476.com, 000521.xyz, 00082aa.com, 00082cc.com, 00082dd.com, 00082ff.com, 00082ii.com, 00082mm.com, 00082rr.com, 00082ss.com, 00082uu.com, 00082xx.com, 00082zz.com, 000865b.com, 000865e.com, 000865g.com, 000865j.com, 00093015.com, 0009827.com, 0009837.com, 000av.app, 000br88.com, 000xxoo.com, 0010.monster, 0018k7.com, 001913.com, 0019k7.com, 001xs.net, 001xs.org, 001xs.xyz, 002.city, 002288211.com, 002r.com, 002t.com, 0031casino.com, 003271.com, 003388211.com, 0039.cf, 0039.ga, 0039.gq, 0039.ml, 003919.com, 003j.com, 004697.com, 004k.com, 004r.com, 005005.xyz, 005588211.com, 0058.ru, 005f4.xyz, 006j.com, 006o.com, 006z.com, 007.surf, 007946.com, 007948.com, 007dotcom.com, 007security.com, 008106.com, 0083015.com, 008g8662shjel9p.xyz, 0094445.com, 009988211.com, 009qs.com, 00b2bcr51qv59xst2.cf, 00b2bcr51qv59xst2.ga, 00b2bcr51qv59xst2.gq, 00b2bcr51qv59xst2.ml, 00b2bcr51q