title: receive csv from server and parse using php
body: <p>this was working up until quite recently and i cannot seem to crack the case.</p>
  
  <p>if you manually visit the url hit against in the script, the results are there..but if i do it in the code, i am having an issue.</p>
  
  <p>you can see in my output test that i am no longer getting any output...</p>
  
  <p>any ideas?</p>
  
  <pre><code>                &lt;?
                  //$ticker=urldecode($_GET["ticker"]);
                  $ticker='HYG~FBT~';
                  echo $ticker;
                  $tickerArray=preg_split("/\~/",$ticker);
                   // create curl resource
                          $ch = curl_init();
  
  
                          // set urlm
                          curl_setopt($ch, CURLOPT_URL, "http://www.batstrading.com/market_data/symbol_data/csv/");
  
  
  
  
                          //return the transfer as a string
  
                          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
                          // $output contains the output string
                          $a='';
  
                          $output = curl_exec($ch);
  
                              echo "&lt;br&gt;&lt;br&gt;OUTPUT TEST: ".($output);
  
  
                  $lineCt=0;
                  $spaceCt=0;
                  $splitOutput=preg_split("[\n|\r]",$output);
  
  
  
  
                  for($ii=0;$ii&lt;sizeof($tickerArray);$ii++){
                  $i=0;
                  $matchSplit[$ii]=-1;
                           while($i&lt;sizeof($splitOutput) &amp;&amp; $matchSplit[$ii]==-1){
  
  
  
                             $splitOutput2=preg_split("/\,/",$splitOutput[$i]);
                                 if($i&gt;0){
  
                                      if(strcasecmp($splitOutput2[0],strtoupper($tickerArray[$ii]))==0){
                                          $matchSplit[$ii]=$splitOutput[$i]."@";
                                      }
  
                                 }
                          $i++;
                          }
                          if($matchSplit[$ii]==-1){
                              echo "notFound@";
                          }else{
                              echo $matchSplit[$ii];
                          }
                  }
  
  
                  //echo ($output);
  
  
                          curl_close($ch);  
  
  
                  ?&gt;
  </code></pre>