Skip to content

marounmelhem/handy-php-functions

Repository files navigation

Handy php functions we use everyday

I'll try to update this project regularly and you're welcome to contribute :)

Table of content:

1. generate-alpha-numeric-tokens

Generate Alpha numeric tokens in specific length

generateAlphaNumericTokens($length)

2. encrypt-decrypt-strings

Generate base64 encryption key

generateKey($length)

Encrypt a string using specific key

encryptStr($data, $key)

Decrypt a string using specific key

decryptStr($data, $key)

3. truncate-strings

Truncate a string to specific length

truncateStr($str,$length)

4. get-user-ip

Get current user IP

getUserIp()

About

That's like a small php Swiss knife

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages