All I have is a Cron Job that runs the script below, Twice a Day, 12AM & 12PM.
PHP Code:
#!/bin/bash
SM19LINUX=$(curl -s -L http://www.sourcemod.net/smdrop/1.9/sourcemod-latest-linux)
SM18LINUX=$(curl -s -L http://www.sourcemod.net/smdrop/1.8/sourcemod-latest-linux)
SM17LINUX=$(curl -s -L http://www.sourcemod.net/smdrop/1.7/sourcemod-latest-linux)
SM19WIN=$(curl -s -L http://www.sourcemod.net/smdrop/1.9/sourcemod-latest-windows)
SM18WIN=$(curl -s -L http://www.sourcemod.net/smdrop/1.8/sourcemod-latest-windows)
SM17WIN=$(curl -s -L http://www.sourcemod.net/smdrop/1.7/sourcemod-latest-windows)
wget -q -N -P /mnt/alliedmodders/am-mirror/sourcemod/1.9/linux http://www.sourcemod.net/smdrop/1.9/$SM19LINUX
wget -q -N -P /mnt/alliedmodders/am-mirror/sourcemod/1.9/windows http://www.sourcemod.net/smdrop/1.9/$SM19WIN
wget -q -N -P /mnt/alliedmodders/am-mirror/sourcemod/1.8/linux http://www.sourcemod.net/smdrop/1.8/$SM18LINUX
wget -q -N -P /mnt/alliedmodders/am-mirror/sourcemod/1.8/windows http://www.sourcemod.net/smdrop/1.8/$SM18WIN
wget -q -N -P /mnt/alliedmodders/am-mirror/sourcemod/1.7/linux http://www.sourcemod.net/smdrop/1.7/$SM17LINUX
wget -q -N -P /mnt/alliedmodders/am-mirror/sourcemod/1.7/windows http://www.sourcemod.net/smdrop/1.7/$SM17WIN
latest.php
PHP Code:
<?php
$files = glob("*.zip"); //tar.gz for linux
$files = array_combine($files, array_map("filemtime", $files));
arsort($files);
$latest_file = key($files);
header("Location: https://sarabveer.me/am-mirror/sourcemod/1.9/windows/$latest_file", true, 302);
?>
Also really about security and tampering, is it that hard to to compare the MD5, SHA-1, or even SHA-256 hashes of the two zips to see if they have been tampered with.
__________________