<html>
<head>
<title>video requestor</title>
</head>
<body>
<?php
 date_default_timezone_set('America/Los_Angeles');
 if($_POST['videourl']!=""){
	 if($_POST['password']=="1234"){
		 $text = str_replace(["<",">"],"",$_POST['videourl']);
		 $text="https://youtube.com/embed/".explode("=",$text)[1];
		 $file=fopen("url.txt","w");
		 fwrite($file,$text);
		 fclose($file);
	 } else {
		 $message="password is not right";
	 }
 }
?>

<p><?php echo $message; ?></p>
<div align="center">
<iframe width="560" height="315" src="<?php echo $text; ?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div><br><br>
<div align="center">
<form method="post">
url: <input autocomplete="off" type="url" name="videourl" maxlength="200" /><br><br>
password: <input autocomplete="off" type="text" name="password" /><br><br>
<input autocomplete="off" type="submit" value="enter">
</div>
</form>
</body>
</html>