From b34810cbff1c613290cf7d4282e242a58b1ddffb Mon Sep 17 00:00:00 2001 From: horus Date: Mon, 15 Mar 2021 18:16:38 +0100 Subject: Inline page in website --- public/resolve.php | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 public/resolve.php (limited to 'public/resolve.php') diff --git a/public/resolve.php b/public/resolve.php deleted file mode 100644 index 95b985c..0000000 --- a/public/resolve.php +++ /dev/null @@ -1,31 +0,0 @@ -request('HEAD', $url, [ 'on_stats' => function( GuzzleHttp\TransferStats $stats ) use ( &$effectiveURL ){ $effectiveURL = $stats->getEffectiveUri(); }]) - ->getBody()->getContents(); - } catch(\Exception $e) { - return $url; - } - - return $effectiveURL->__toString(); -} - -function getURL() { - if ( empty($_REQUEST['url']) ) { - $data = json_decode(file_get_contents('php://input'), true); - return $data['url']; - } else { - return $_REQUEST['url']; - } -} - -echo json_encode( ['url' => resolveURL( getURL() ) ]); -- cgit v1.2.3