PHP code example of moviet / session-scary
1. Go to this page and download the library: Download moviet/session-scary library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
moviet / session-scary example snippets
Scary::set('my_token')->value('11001101')->get();
$_SESSION['my_token'] = '11001101'
Scary::read('my_token'); // output => 11001101
Scary::mset('My Session Manager')
->mkey(['Specialist','Senior','Junior'])
->mval(['value_1','value_2','value_3'])
->swap();
$keys = ['Specialist','Senior','Junior'];
$values = ['Baz','Biz','Buz'];
Scary::mset('My Session Manager')
->mkey($keys)
->mval($values)
->swap();
Scary::read('My Session Manager','Junior'); // output => Buz
Scary::change('Angry Boss','Run'); // replace other value eg. Run
Scary::mchange('My Bread','My Chocolato','Eat Me');
Scary::set('my_key')->value('11001101')->inc(5)->get();
Scary::mset('My Desire Key')
->mkey(['Eat','Drink','Lick','Whatever..'])
->mval(['Apple','Orange','Lollipop','Hufft..'])
->inc(5) // <=
->swap();
if (Scary::flinc('My Desire Key') !== true)
// Do something
Scary::set('my_key')->value('11001101')->ttl(5)->get();
Scary::mset('My Desire Key')
->mkey(['Smile','Happy','Affraid'])
->mval(['Lost','Donate','Any Expression Here'])
->swap();
Scary::live('My Desire Key', 5) // it can be place in somewhere pages, if return false, you can do something
if (Scary::exist('my_session_key'))
// Do something
Scary::newId('my_session_key');
Scary::refresh('my_session_key'); // session_regenerate_id(true)
Scary::trash('my_session_key');
Scary::trash('chocomelo, durian, alphanut, loggadin, url, token, and...');
Scary::clean('my_session_key');
use Moviet\Session\Scary;
// Generate Cross Smile Request Poorgery
$randomToken = base64_encode(random_bytes(32));
Scary::set('Emo Cry Attack')->value($randomToken)->get();
$check = Scary::read('Emo Cry Attack');
// dump : JHs+jsakjkja87823hsalwatah989jsajh+sakCacanana83729Mama=
use Moviet\Session\Scary;
// Type whatever collection
$verify = 'true';
// Register what you need
$loggadId = '2928929-988787-8877-78688868';
// Type secret code etc
$randomMult = bin2hex(random_bytes(16));
// Type like Adurl
$downloadUrl = 'github.com/moviet/session-scary';
/**
* Compile them in single bandage
*/
Scary::mset('Something key')
->mkey(['verify','token_key','mis-loggadin','download-url'])
->mval([$verify, $randomMult, $loggadId, $downloadUrl])
->swap();
$getClone = Scary::read('Something key','download-url');
// dump yaaaayyy : github.com/moviet/session-scary