2017 © Pedro Peláez
 

library holt45

A library with a mix of functions...

image

w3l/holt45

A library with a mix of functions...

  • Wednesday, March 28, 2018
  • by w3l
  • Repository
  • 2 Watchers
  • 2 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 30 Versions
  • 0 % Grown

The README.md

holt45 - A library with a mix of functions...

License Build Status Latest Version Dependency Status Badges, (*1)

Scrutinizer Code Quality SensioLabs Insight Code Climate Codacy Badge BCH compliance CodeFactor, (*2)

Class Features

  • @todo: Write something awesome here.

Installation

Composer

composer require w3l/holt45

Holt45 at packagist, (*3)

Manually

include_once("folder/holt45.php");

Usage

holt45::getClientIpAddress()

Documentation

Generated API documentation is found here, (*4)

  • $_GET
    • chkGet()
    • assignFromGet()
    • chkGetAll()
  • $_POST
    • chkPost()
    • assignFromPost()
    • chkPostAll()
  • Sessions
    • sessionSet()
    • sessionIsset()
    • sessionRead()
    • sessionDelete()
  • Time
    • timestampToHttpDate()
    • timeElapsed()
  • Browser
    • getClientIpAddress()
    • getClientOperatingSystem()
    • getBrowserNameFromUA()
    • getClientBrowser()
    • isClientBrowserGoogleChrome()
    • getBrowserAccessKeyModifiers()
  • Convert
    • rgbhex()
    • hexrgb()
    • colorBlend()
  • Strings
    • encrypt()
    • decrypt()
    • textareaEncode()
    • textareaDecode()
    • obfuscateString()
    • deobfuscateString()
    • replaceString()
    • rainbowText()
    • kbdSymbol()
    • kbdShortcut()
    • cssOneLineText()
  • Math
    • generatePaginationRange()
  • Misc
    • getClientIpAddress()
    • urlParser()
    • generatePassword()
    • iso3166ToName()
    • ppre()
  • constants
    • DATA_URI_TRANSPARENT_GIF
    • DATA_URI_TRANSPARENT_PNG
  • constants(global)
    • DATE_DATETIME
    • HEADER_418

Example code:

<?php
/* $_GET */
if (holt45::chkGet("q")) { echo '$_GET["q"] is set'; }

echo holt45::assignFromGet("q"); // "" or $_GET["q"]

if (holt45::chkGetAll(array("q", "search"))) { echo '$_GET["q"] and $_GET["search"] is set'; }

/* $_POST */
if (holt45::chkPost("q")) { echo '$_POST["q"] is set'; }

echo holt45::assignFromPost("q"); // "" or $_POST["q"]

if (holt45::chkPostAll(array("q", "search"))) { echo '$_POST["q"] and $_POST["search"] is set'; }

/* Sessions */
holt45::sessionSet("example_session_name", "content of session", 86400);

if (holt45::sessionIsset("example_session_name")) { echo 'Session example_session_name is set and not expired'; }

echo holt45::sessionRead("example_session_name"); // content of session

holt45::sessionDelete("example_session_name"); // Deletes session

/* Time */
echo holt45::timestampToHttpDate("1980-01-01 17:15:00"); // Tue, 01 Jan 1980 16:15:00 GMT

echo holt45::timeElapsed("1980-01-01 17:15:00"); // 13173 days

/* Browser */
echo holt45::getClientIpAddress(); // 127.0.0.1

echo holt45::getClientOperatingSystem(); // linux

echo holt45::getClientBrowser(); // Firefox

if ($results = holt45::getBrowserAccessKeyModifiers("1")) {
    $results[0]; // Array([0] => "Alt", [1] => "Shift", [2] => "1");
}

/* Convert */
echo holt45::rgbhex(array(255, 0, 0)); // ff0000

print_r(holt45::hexrgb("#FF0000")); // Array([0] => 255, [1] => 0, [2] => 0)

print_r(holt45::colorBlend(array(0, 0, 0), array(255, 255, 255))); // Array ( [0] => 128 [1] => 128 [2] => 128 )

/* Strings */
echo holt45::encrypt("some text", "pazz11!!klb"); // vZp3TdnGAY6/NPgM9sz3qUW24nTbthX+mHdqG7BWCDJVnmqWcz6IMEAs9sqcaVD0Efv4iXSIulUmlrp+E6Z0/w==

echo holt45::decrypt("vZp3TdnGAY6/NPgM9sz3qUW24nTbthX+mHdqG7BWCDJVnmqWcz6IMEAs9sqcaVD0Efv4iXSIulUmlrp+E6Z0/w==", "pazz11!!klb"); // some text

echo holt45::textareaEncode('<textarea id="tex1"></textarea> 

asdasd , (*5)

'); // [textarea id="tex1"][/textarea]

asdasd , (*6)

echo holt45::textareaDecode('[textarea id="tex1"][/textarea]

asdasd , (*7)

'); // <textarea id="tex1"></textarea>

asdasd , (*8)

echo holt45::obfuscateString("Hi, I'm a ninja!"); // 49574671626d6c75494745676253644a4943787053413d3d echo holt45::deobfuscateString("49574671626d6c75494745676253644a4943787053413d3d"); // Hi, I'm a ninja! echo holt45::replaceString("Hi my name is [@foo] and i like [@bar]", array("foo" => "sven", "bar" => "beer")); // Hi my name is sven and i like beer echo holt45::rainbowText("Hallo world"); // <span style="color: #ff0000;">H</span><span style="color: #ff3300;">a</span>... echo holt45::kbdSymbol("enter"); // &#9166; echo holt45::kbdShortcut(array("Ctrl", "Alt", "Delete"), "auto"); // <kbd class="holt45-kbd"><span class="holt45-kbd__symbol">&#10034;</span>Ctrl</kbd> + <kbd class="holt45-kbd"><span class="holt45-kbd__symbol">&#9095;</span>Alt</kbd> + <kbd class="holt45-kbd"><span class="holt45-kbd__symbol">&#9003;</span>Delete</kbd> echo holt45::cssOneLineText("hallo world!", "h1", 80, 320); /* Math */ print_r(holt45::generatePaginationRange(106, 15, 7)); // Array([0] => 1, [1] => 13, [2] => 14, [3] => 15, [4] => 16, [5] => 17, [6] => 106) /* Misc */ print_r(holt45::urlParser("htt://w.google..com/")); // Array([url] => http://www.google.com/, [url_display] => www.google.com) echo holt45::generatePassword(10); // 2k%=cbot:w echo holt45::generatePassword(10, "simple"); // m9b7gfkmhc echo holt45::iso3166ToName("SE"); // SWEDEN /* constants */ echo holt45::DATA_URI_TRANSPARENT_GIF; // data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 echo holt45::DATA_URI_TRANSPARENT_PNG; // data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=

License

Holt45 is unlicense licensed. TL;DR? Do what you want with the code., (*9)

The Versions

28/03 2018

dev-master

9999999-dev http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

28/03 2018

0.7.4

0.7.4.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

28/03 2018

dev-dev

dev-dev http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

10/05 2017

0.7.2.1

0.7.2.1 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

10/05 2017

0.7.3

0.7.3.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

10/05 2017

0.7.2

0.7.2.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

16/05 2016

0.7.1

0.7.1.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

03/03 2016

v0.7

0.7.0.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

19/02 2016

v0.6.1

0.6.1.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

19/02 2016

v0.6

0.6.0.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense CC0-1.0

The Requires

  • php >=5.6.0

 

The Development Requires

url password time session noob

17/02 2016

v0.5

0.5.0.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

11/02 2016

v0.4.11

0.4.11.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

06/02 2016

v0.4.10

0.4.10.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

05/02 2016

v0.4.9

0.4.9.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

01/02 2016

v0.4.8

0.4.8.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

01/02 2016

v0.4.7

0.4.7.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

29/01 2016

v0.4.6-patch

0.4.6.0-patch http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

29/01 2016

v0.4.6

0.4.6.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

27/01 2016

v0.4.5

0.4.5.0 http://holt45.pw/

A library with a mix of functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.4.0

 

The Development Requires

url password time session noob

25/01 2016

v0.4.4

0.4.4.0 http://holt45.pw/

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

The Development Requires

url password time session noob

24/01 2016

v0.4.3

0.4.3.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

The Development Requires

url password time session noob

24/01 2016

v0.4.2

0.4.2.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

The Development Requires

url password time session noob

24/01 2016

v0.4.1

0.4.1.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

The Development Requires

url password time session noob

23/01 2016

v0.3.1

0.3.1.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

url password time session noob

22/01 2016

v0.3.0

0.3.0.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

url password time session noob

22/01 2016

v0.2.2

0.2.2.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

url password time session noob

22/01 2016

v0.2.1

0.2.1.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

url password time session noob

22/01 2016

v0.2.0

0.2.0.0

A small library with some really basic functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

url password time session noob

22/01 2016

v0.1.2

0.1.2.0

Toolbox with some functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0

 

21/01 2016

v0.1.1

0.1.1.0

Toolbox with some functions...

  Sources   Download

Unlicense

The Requires

  • php >=5.3.0