n

t.co to random nitter instance redirector
Log | Files | Refs

commit c8542302acba3d84ff37b5e4c6c68e4edcc74a0a
Author: xfnw <xfnw@ttm.sh>
Date:   Wed, 17 Mar 2021 21:23:33 -0400

it works!

Diffstat:
Aindex.php | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/index.php b/index.php @@ -0,0 +1,24 @@ +<?php + +$instances = Array('nitter.eu','nitter.fdn.fr','nitter.tedomum.net'); + +$instance = $instances[array_rand($instances)]; + +//echo $instance; + +$path = key($_GET); // just take the entire query str lol + +$headers = @get_headers('https://t.co/'.$path,1); + +//print_r($headers); + +if (isset($headers['location'])) { + $url = str_replace('https://twitter.com/','https://'.$instance.'/',$headers['location']); + header('Location: '.$url); +} else { +?> +<h1>t.co nitter converter</h1> +t.co/honk -> xfnw.ttm.sh/n?honk -> some.nitter.instance/expanded/url +<?php +} +