changed $opts[CURLOPT_POSTFIELDS] assignment and queryTempView()