Curl wrapper for PHP