To view the list of links, please access this site using Tor Browser.
If you’re seeing this message, access is restricted for regular browsers.
Already using Tor? If you are sure you’re currently in Tor Browser, proceed to our .onion version:
This is an example post which has a valid post https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9# (hexadecimal hash [0-9a-fA-F] of 20 chars), an invalid post /post/thisisnotarealpost, a post with comment https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-532179bdc2f3a30da5 (comment hextadecimal hash of 18 chars [0-9a-fA-F]), a couple invalid post comment https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-notrealcommenthere /post//#c-notrealcommenthere This is an example wikipage https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2ZDJscmFUOXBaRDB3WmpBMU1UbGhZZz09# (wiki hexadecimal hash of 8 chars [0-9a-fA-F]), This here are a few invalid wikipages https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki?id=notreal /d//wiki?id=0f0519ab https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wikiOUT:
This is an example post which has a valid post <a href="https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#">https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#</a> (hexadecimal hash [0-9a-fA-F] of 20 chars), an invalid post /post/thisisnotarealpost, a post with comment <a href="https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-532179bdc2f3a30da5">https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-532179bdc2f3a30da5</a> (comment hextadecimal hash of 18 chars [0-9a-fA-F]), a couple invalid post comment https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-notrealcommenthere /post//#c-notrealcommenthere This is an example wikipage <a href="https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2ZDJscmFUOXBaRDB3WmpBMU1UbGhZZz09#">https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2ZDJscmFUOXBaRDB3WmpBMU1UbGhZZz09#</a> (wiki hexadecimal hash of 8 chars [0-9a-fA-F]), This here are a few invalid wikipages https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki?id=notreal /d//wiki?id=0f0519ab https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki
/post/<hash>and this is what the link contents look like:
http://<url>.onion/post/<a href=. Not sure if regex related but wanted to let you know.
<?php $input = "This is an example post which has a valid post https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#, an invalid post /post/thisisnotarealpost, a post with comment https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-532179bdc2f3a30da5, and a few invalid post comments https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-notrealcommenthere /post//#c-notrealcommenthere. Also, here's an example wikipage https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2ZDJscmFUOXBaRDB3WmpBMU1UbGhZZz09# and a few invalid ones: https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki?id=notreal /d//wiki?id=0f0519ab https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki."; $output = preg_replace('~\/post\/([0-9a-fA-F]{20}/#c-[0-9a-fA-F]{18})~', '<a href="/post/$1">/post/$1</a>', $input); $output = preg_replace('~\/post\/([0-9a-fA-F]{20})~', '<a href="/post/$1">/post/$1</a>', $output); $output = preg_replace('~\/d\/Dread\/wiki\?id=([0-9a-fA-F]{8})~', '<a href="https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki?id=$1">https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki?id=$1</a>', $output); echo $output; ?>
This is an example post which has a valid post <a href="https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#">https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#</a>, an invalid post /post/thisisnotarealpost, a post with comment <a href="https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-532179bdc2f3a30da5">https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-532179bdc2f3a30da5</a>, and a few invalid post comments https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-notrealcommenthere /post//#c-notrealcommenthere.
Also, here's an example wikipage <a href="https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2ZDJscmFUOXBaRDB3WmpBMU1UbGhZZz09#">https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2ZDJscmFUOXBaRDB3WmpBMU1UbGhZZz09#</a> and a few invalid ones: https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki?id=notreal /d//wiki?id=0f0519ab https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki.
<?php $input = "This is an example post which has a valid post https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#, an invalid post /post/thisisnotarealpost, a post with comment https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-532179bdc2f3a30da5, and a few invalid post comments https://torhoo.cc/go.php?u=TDNCdmMzUXZPREZsTkRWbE4yRTBObU5sWTJGbE5XSTFORGs9#/#c-notrealcommenthere /post//#c-notrealcommenthere. Also, here's an example wikipage https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2ZDJscmFUOXBaRDB3WmpBMU1UbGhZZz09# and a few invalid ones: https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki?id=notreal /d//wiki?id=0f0519ab https://torhoo.cc/go.php?u=TDJRdlJISmxZV1F2#wiki."; $output = preg_replace('~\/post\/([0-9a-fA-F]{20}/#c-[0-9a-fA-F]{18})~', '<a href="/post/$1">/post/$1</a>', $input); $output = preg_replace('~\/post\/([0-9a-fA-F]{20})~', '<a href="/post/$1">/post/$1</a>', $output); $output = preg_replace('~\/d\/([^\/]+)/wiki\?id=([0-9a-fA-F]{8})~', '<a href="/d/$1/wiki?id=$2">/d/$1/wiki?id=$2</a>', $output); echo $output; ?>
$output = preg_replace('/\/post\/([0-9a-fA-F]{20}\/#c-[0-9a-fA-F]{18})/', '<a href="/post/$1">/post/$1</a>', $output); $output = preg_replace('/([\s.,!0-0a-fA-F])\/post\/([0-9a-fA-F]{20})/', '$1<a href="/post/$2">/post/$2</a>', $output);This checks that there is either a space, full stop, comma, exclamation mark, number, or letter before "/post". Because after the first conversion there is a " and > before it so we don't want that. It then puts that character that got matched at the start back where it was before the <a. Also the wiki regex has a bug and if you write something with spaces like "/d/ invalid /wiki?id=123456ab" it will turn it into a link. Better to filter with letters/numbers like:
$output = preg_replace('/\/d\/([0-9a-zA-Z]+)\/wiki\?id=([0-9a-fA-F]{8})/', '<a href="/d/$1/wiki?id=$2">/d/$1/wiki?id=$2</a>', $output);
$output = preg_replace('/\/post\/([0-9a-fA-F]{20})(\?p=[1-9]\#c\-[0-9a-fA-F]{18}|\/\#c\-[0-9a-fA-F]{18})?/', '<a href="/post/$1$2">/post/$1$2</a>', $input);
The regex is basically just this: