Skip to content

Instantly share code, notes, and snippets.

@manhere
manhere / hexit.php
Created December 1, 2022 04:59 — forked from srsbiz/hexit.php
Web hex dumper, with colors
<?php
header('Content-Type: text/html; charset=utf-8');
define('POST_MAX_LENGTH', 4096);
if (!isset($_POST['txt'])) {
$txt = "<?php\necho 'Hello World!';\n?>";
} elseif(strlen($_POST['txt']) > POST_MAX_LENGTH) {
$txt = substr($_POST['txt'], 0, POST_MAX_LENGTH);
} else {
$txt = $_POST['txt'];
@manhere
manhere / token.class.php
Last active August 29, 2015 14:26 — forked from BelinChung/token.class.php
REST API 中调用校验Token的生成与维护
<?php
class Token
{
private $mmc;
private $cache_time;
function __construct()
{
$this->cache_time = 60 * 60 * 24;