Modified version of Microsoft Dynamics PHP Connect tool kit.