This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_month($startdate,$month) { | |
$anyDate = date("Y-m-d",strtotime($startdate . " +1 days")); | |
$nextDate = date("Y-m-d",strtotime($anyDate . " +".$month." month")); | |
$checkDate = date("Y-m-d",strtotime($nextDate . " -".$month." month")); | |
if($anyDate != $checkDate){ | |
list($yr,$mn,$da) = split('-',$anyDate); // separate date | |
$mn = $mn + $month; | |
$timestamp = mktime(0,0,0,$mn,1,$yr); | |
list($y,$m,$t) = split('-',date('Y-m-t',$timestamp)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Spacebase Savegame-Reader in PHP | |
//Rewritten by Athesis Breda | |
//Original by sj26, https://gist.github.com/sj26/ | |
//Read Save-File | |
$file = file_get_contents('./SpacebaseDF9AutoSave.sav', true); | |
//RAW Inflate Savefile | |
$compressed = gzinflate($file, 280000000 ); |