title: php curl_setopt() returns json data with "1" on end
body: <p>so I have a curl_setopt that is pulling a json file just fine with php. It does this with one exception, at the end of the json data there is a one (1) on the end after the last '}'. This "1" is not apparent in the url call by itself without using curl though. So it seems my curl_setopt is not configured properly. Can someone help with this?</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $domain.$args);
  curl_setopt($ch, CURLOPT_HEADER, false);
  $json = curl_exec($ch);
  curl_close($ch);
  </code></pre>
  
  <p>the <em>$domain.$args</em> is working fine as I can echo out this variable setup and produce the json manually via browser without the 1.</p>
  
  <p>appreciate the help</p>
  
  <p>/<strong>** edit after suggestions **</strong>/</p>
  
  <p>I tried the suggestion below of adding: </p>
  
  <p>curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);</p>
  
  <p>this just ended up changing the entire json output, not just adding a "1" on the end of the response:</p>
  
  <pre><code>"{\"data\":[{\"Name\":\"A3\",\"SeoName\":\"a3\"},{\"Name\":\"A4\",\"SeoName\":\"a4\"},{\"Name\":\"A5\",\"SeoName\":\"a5\"},{\"Name\":\"A6\",\"SeoName\":\"a6\"},{\"Name\":\"A7\",\"SeoName\":\"a7\"},{\"Name\":\"A8\",\"SeoName\":\"a8\"},{\"Name\":\"allroad\",\"SeoName\":\"allroad\"},{\"Name\":\"Q5\",\"SeoName\":\"q5\"},{\"Name\":\"Q5 hybrid\",\"SeoName\":\"q5-hybrid\"},{\"Name\":\"Q7\",\"SeoName\":\"q7\"},{\"Name\":\"R8\",\"SeoName\":\"r8\"},{\"Name\":\"RS 5\",\"SeoName\":\"rs-5\"},{\"Name\":\"RS 7\",\"SeoName\":\"rs-7\"},{\"Name\":\"S4\",\"SeoName\":\"s4\"},{\"Name\":\"S5\",\"SeoName\":\"s5\"},{\"Name\":\"S6\",\"SeoName\":\"s6\"},{\"Name\":\"S7\",\"SeoName\":\"s7\"},{\"Name\":\"S8\",\"SeoName\":\"s8\"},{\"Name\":\"SQ5\",\"SeoName\":\"sq5\"},{\"Name\":\"TT\",\"SeoName\":\"tt\"},{\"Name\":\"TTS\",\"SeoName\":\"tts\"}]}"
  </code></pre>