87 lines
1.1 KiB
PHP
Executable File
87 lines
1.1 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: seekdasky
|
|
* Date: 09/12/15
|
|
* Time: 11:40
|
|
*/
|
|
require_once('autoloader.php');
|
|
|
|
// Response::quickResponse(200,'lol');
|
|
$json = [
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
],
|
|
|
|
[
|
|
"nom" => "Alex",
|
|
"prenom" => "Alex",
|
|
]
|
|
];
|
|
|
|
$compressed = compress( json_encode($json) );
|
|
$uncompressed = uncompress( $compressed );
|
|
|
|
echo $compressed.'<br><br>';
|
|
echo $uncompressed.'<br><br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function customCompression($input, compression){
|
|
if( $compression ) return strtr(base64_encode(addslashes(gzcompress(serialize($input),9))), '+/=', '-_,');
|
|
else return unserialize(gzuncompress(stripslashes(base64_decode(strtr($input, '-_,', '+/=')))));
|
|
}
|
|
|
|
function uncompress($input){
|
|
|
|
} |