Skip to content

Instantly share code, notes, and snippets.

@mohemohe
Created September 25, 2016 14:45
Show Gist options
  • Select an option

  • Save mohemohe/9daef3d7f3ea0745b1b7251fe45d8f73 to your computer and use it in GitHub Desktop.

Select an option

Save mohemohe/9daef3d7f3ea0745b1b7251fe45d8f73 to your computer and use it in GitHub Desktop.
うおおおおおおおおおおおおああああああああああああああああああああああああああああああ!!!!!!!!!!!! (ブリブリブリブリュリュリュリュリュリュ!!!!!!ブツチチブブブチチチ
<?php
mb_internal_encoding('UTF-8');
$butimiri = 'うおおおおおおおおおおおおあああああああああああああああああああああああああああああああ!!!!!!!!!!! (ブリブリブリブリュリュリュリュリュリュ!!!!!!ブツチチブブブチチチチブリリイリブブブブゥゥゥゥッッッ!!!!!!!)';
$arg = urldecode(htmlspecialchars($_SERVER['REQUEST_URI']));
$target = mb_substr(mb_strstr($arg, '?'), 1, mb_strlen($arg) - 1);
if(!empty($target)) {
$reply = '@'.$target;
$reply = mb_ereg_replace('\\+', ' ', $reply);
$reply = mb_ereg_replace('/', ' ', $reply);
$reply = trim($reply);
$reply = mb_ereg_replace(' ', ' @', $reply);
$reply = mb_ereg_replace('@@', '@', $reply);
$body = mb_substr($reply.' '.$butimiri, 0, 140);
//header('Location: https://twitter.com/intent/tweet?text='.urlencode(mb_strimwidth($reply.$butimiri, 0, 140)).'&source=webclient', true, 301);
}
else {
$body = mb_substr($butimiri, 0, 140);
}
header('Location: https://twitter.com/intent/tweet?text='.urlencode($body).'&source=webclient', true, 302);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment