<?php ob_start(); require_once 'src/core/LightUrl.php'; if (empty($_GET['shortURL'])) { header("location:index.php"); } else { $light = new LightUrl(); $shortURL = $_GET['shortURL']; $response = $light->getURLInfo($shortURL); if (empty($response->bulkUrl)) { header("location:index.php"); } else { header("location:{$response->bulkUrl}"); } }