php code for crm