<!DOCTYPE html >
<html>
<head>
<title>Set URL</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<h1>Set URL</h1>

<form action="set.php" method="get">
  <label for="url">URL:</label>
  <input type="text" name="url" autocomplete="off" />
  <input type="submit" value="Set" />
</form>

<?php

if (isset($_GET['url'])) {
    $url = $_GET['url'];
    if (file_put_contents("saved.url", urldecode($url)) == false)
        echo "<p>Failed to set URL!</p>";
    else
        echo "<p>URL set successfully to: <a href=\"$url\">$url</a>.</p>";
}

?>

</body>
</html>