fully replaced binary curl with php