I made a simple counter, but it increments by 2 instead of 1.
$handle = fopen('progress.txt', 'r');
$pro = fgets($handle);
print $pro; // incremented by 2, WTF?
fclose($handle);
$handle = fopen('progress.txt', 'w');
fwrite($handle, $pro);
fclose($handle);
Everytime I read the file it has been incremented by 2, instead of 1.