Creating a Link Shortener Using Backend PHP

Tiempo de lectura: < 1 minutoWe will learn today how to create a link shortener for our back end using a simple PHP script. We will create our shortener, we can call it link.php <?php // Cabecera header(“Access-Control-Allow-Origin: *”); date_default_timezone_set(“Europe/Madrid”); //Anti Bots if (preg_match(‘/bot|crawl|spider|preview/i’, $userAgent)) { // No registrar bots header(“Location: $target”, true, 302); exit; } // Recoger slug $slug … Read more







