2ch trip php

というわけで2chtripを実装したのですが(引用)

/*20210625 猫・2chtrip http://www.mits-jp.com/2ch/ */

function tripuse($key) {
#$tripkey = '#istrip';? //パスワードとする文字列(# 付き)
$key = mb_convert_encoding($key, "SJIS", "UTF-8"); // to, from
# $key = '#'.substr($key, strpos($key, '#'));

# トリップ
# $trip は0thelloに使用
$trip = '';
if (preg_match("/([^\#]*)\#(.+)/", $key, $match)) {
if (strlen($match[2]) >= 12){
# 新仕様変換
$mark = substr($match[2], 0, 1);
if ($mark == '#' || $mark == '$'){
if (preg_match('|^#(:xdigit:{16})([./0-9A-Za-z]{0,2})$|',$match[2],$str)){
$trip = substr(crypt(pack('H*', $str[1]), "$str[2].."), -10);
} else {
# 将来の拡張用
$trip = '???';
}
} else {
// $trip = substr(base64_encode(pack('H*', sha1($match[2]))), 0, 12);
$trip = substr(base64_encode(sha1($match[2],TRUE)),0,12);
$trip = str_replace('+','.',$trip);
}
} else {
$salt = substr($match[2]."H.", 1, 2);
$salt = preg_replace("/[^\.-z]/", ".", $salt);
$salt = strtr($salt,":;<=>?@[\\]^_`","ABCDEFGabcdef");
$trip = substr(crypt($match[2], $salt),-10);
}
# $match[1] = str_replace("◆", "◇", $match[1]);
# $_POST['FROM'] = $match[1]."</b> ◆".$trip."<b>";
$trip ="◆".$trip;
} else {
$trip = str_replace("◆", "◇", $key);
}
return $trip;
}

関数として予約。

くずはすくりぷとPHP ver0.0.8alpha (2005/04/01)(source) ヶ + @Links (UTF-8化) (source) + 擬古猫、に実装。

 

  # トリップ機能(簡易騙り防止機能)
else if (strpos($message['USER'], '#') !== FALSE) {
$message['USER'] = substr($message['USER'], 0, strpos($message['USER'], '#')) . ' <span class="mut">◆'
. substr(preg_replace("/\W/", '', crypt(substr($message['USER'], strpos($message['USER'], '#')), '00')), -7) .$this->tripuse($message['USER']). '</span>';
}
else if (strpos($message['USER'], '◆') !== FALSE) {
$message['USER'] .= '(騙り)';
}

 独自トリップの後に2chtripが付きます。ほかの検索では結果が得られなかった。これは稼働するようです。

http://zantei.php.xdomain.jp/

Amazon Kindleストアで無料キャンペーン

投稿者:擬古猫   投稿日時:2020/02/07(金) 20:37:57                 

  ∧ ∧
/(´3`)ノ<五日間の無料キャンペーン。明日から
  ̄ ̄ ̄ ̄ ̄|

https://www.amazon.co.jp/gp/product/B083V2KRHX

 

zantei.php.xdomain.jp

 

Σ:)[どういう感じになるのかな

◎さ〜

更新サボってて

とりあえずは様子見

ΣXD「あいたーっ!!

    投稿者:    投稿日時:2019/12/10(火) 03:10:09              

2020年2月2日がヤバいぞ(;´Д`)

 何がヤバいのかはさておきヤバそうだ。

zantei.php.xdomain.jp


2018年09月02日のツイート

2018年09月01日のツイート

2018年08月31日のツイート