title: Resource ID #3 without using MySQL
body: <p>I'm constructing a brandchecker for my internship. One of the parts of it is where you enter a name, and the checker checks on Twitter if the username is taken or not. This is the code I made (file_get_contents doesn't work on my server):</p>
  
  <pre><code>&lt;?php
  $ch = curl_init(); 
  $timeout = 0; 
  curl_setopt ($ch, CURLOPT_URL, "https://twitter.com/users/username_available?username=".$z); 
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
  curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); 
  $twitter_contents = curl_exec($ch);
  curl_close($ch);
  
  echo $ch;
  ?&gt;
  </code></pre>
  
  <p><code>$z</code> is defined above the code where I check Facebook for the username. It's defined as whatever people enter as their potential company name.</p>
  
  <p><code>echo $ch;</code> outputs Resource id #3. Everywhere, people are talking about how this is not an error, but a MySQL result that needs to be pulled through a <code>var_dump()</code>. But as you can see, I'm not pulling the data from MySQL, but from Twitter.com. </p>
  
  <p>The Facebook checker uses cURL aswell, and it works flawlessly. And yes, I have switched out <code>$ch</code> with other variables.</p>
  
  <p>Does anyone have a solution to my problem?</p>
  
  <p><strong>Edit:</strong> I just tried <code>echo(var_dump($ch));</code>, and it returned <code>resource(3) of type (Unknown)</code></p>