resolving PHP Notice about undefined constant - documentation on curl_setopt is unclear but it seems quoted string works here
cleaning up notices and warnings from PHP about undefined variables or indexes