moving curl to common for php