Manual BE Updater

From Soldat Community Wiki
Revision as of 12:38, 15 August 2012 by Freeman (talk | contribs) (Created page with "<pre><nowiki> ||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||| BE MANUAL UPDATER |||||||||| |||||||||| by mar77a |||||||||| |||||...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 ".";
}


?>