Simple PHP implentation of HTTP interactions using cUrl