title: Curl urls in PHP?
body: <p>I am trying to do some curl'ing from PHP</p>
  
  <p>I have:</p>
  
  <pre><code>$url="http://sites.target.com/site/en/spot/mobile_fiats_results.jsp?_DARGS=/site/en/spot/mobile_fiats.jsp&amp;asin=&amp;dpci=".$arriPadSKU[$counter]."&amp;zipcode=".$vZip."&amp;city=&amp;state=";
  
  $curl_handle=curl_init();
  curl_setopt($curl_handle,CURLOPT_URL, '$url');
  curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
  curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
  
  $buffer = curl_exec($curl_handle);
  
  curl_close($curl_handle);
  </code></pre>
  
  <p>$url produces a URL like this and it works in a browser:</p>
  
  <p><code>http://sites.target.com/site/en/spot/mobile_fiats_results.jsp?_DARGS=/site/en/spot/mobile_fiats.jsp&amp;asin=&amp;dpci=057-10-1830&amp;zipcode=95128&amp;city=&amp;state=</code></p>
  
  <p>However I dont seem to get results from my Curl call, I dont think any results are returned. If I look though the results in $buffer I dont see the data like I do on the page.</p>
  
  <p>Can I not set a $url like this to CURLOPT_URL?</p>
  
  <p>How would I structure this From a command line this works:</p>
  
  <p><code>echo "iPad 2 Wi-Fi White 16GB: "; curl -s --data "_dyncharset=ISO-8859-1&amp;asin=&amp;dpci=057-10-1839&amp;zipcode=95128&amp;city=&amp;state=" <a href="http://sites.target.com/site/en/spot/mobile" rel="nofollow">http://sites.target.com/site/en/spot/mobile</a>_fiats_results.jsp?_DARGS=/site/en/spot/mobile_fiats.jsp</code></p>