Simple PHP implementation of HTTP interactions using cUrl