Manual BE Updater

From Soldat Community Wiki
Jump to: navigation, search
|||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||       BE MANUAL UPDATER       ||||||||||
||||||||||            by mar77a          ||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||

<?php

echo "Retrieving...\n\n";
$new_f = file_get_contents("http://www.battleye.com/soldat/BEClient.dll");
$old_crc = crc32(file_get_contents("BEClient.dll"));
$new_crc = crc32($new_f);
echo "Current CRC32: " . $old_crc . "\n";
echo "Web CRC32: " . $new_crc . "\n\n";

if($old_crc != $new_crc){
	echo "UPDATING BATTLEYE ...";
	$fp = fopen("BEClient.dll", "w");
	fwrite($fp, $new_f);
	fclose($fp);
	echo "DONE\n";
}else{
	echo "NO UPDATE AVAILABLE\n";
}

echo "\nExit";

for($i=0;$i<3;$i++){
	sleep(1);echo ".";
}


?>