Git Product home page Git Product logo

zlsafe's Introduction

zlsafe

a php extension function for the safe session and safe array for form (php7) /*

  • author:liang.zhang laowantong
  • safe session will check the compute diff,if other compute or brower,will false,you can process it.
  • safe form array,you can encrypt the form input or array key */ zlsafe add function list

string zlsafe_session_id([ string $id ]) see session_id(),if set $id,the SESSIONID will set cookie and return sessionid,you can use it before session_start()

string zlsafe_md5(string $id ) this function will return zlsafe_session_id sessionid,but not set cookie

string zlsafe_md5_real(string $str) equal md5()

string zlsafe_md5_encrypt(string $str) this function will encrypt for ip and brower infomation

bool zlsafe_session_check([ string $id ]) if not $id,zlsafe_session_check will return local sessionid check result,if sessionid not form this compute,it will return false

bool zlsafe_session_checkip([ string $id ]) if not $id,zlsafe_session_check will return local sessionid check result,if sessionid not form this compute ip,it will return false

array zlsafe_array_encrypt(array $data,string $key,[string $fun=encrypt|md5]) will encrypt all the key of array,please set $key for encrypt

array zlsafe_array_decrypt(array $data,string $key,[string $fun=decrypt]) will decrypt all the key of array,please set $key for decrypt

string zlsafe_encrypt(string $str) the string will be encrypted,it equal for zlsafe_array_encrypt key

string zlsafe_decrypt(string $str) the string will be decrypted,it equal for zlsafe_array_decrypt key

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.