<?php
$allowed_ips = array("123.456.789.10", "987.654.321.0");
if (!in_array($_SERVER['REMOTE_ADDR'], $allowed_ips)) {
die("Sorry, access is restricted.");
}
// Dosya.mp4
?>Bu şekilde bir index.php oluşturdum ama yine de dosya uzantı yolunu yazınca indiriyor yada ben anlayamadım
<?php
$allowed_ips = array("123.456.789.10", "987.654.321.0");
if (!in_array($_SERVER['REMOTE_ADDR'], $allowed_ips)) {
die("Sorry, access is restricted.");
}
// Video dosyasının URL'si
$file = "http://sitem.com/video.mp4";
header("Content-Type: video/mp4");
header("Content-Length: " . filesize($file));
readfile($file);
?>
Bunu deneyin olmazsa yoksa şifreleme sistemi kodu vereyim