title: php curl data scraping
body: <p>I have a CURL code to fetch data from a site it is working fine for last few months but suddenly stop working for me it says </p>
  
  <pre><code>HTTP/1.0 302 Moved Temporarily
  </code></pre>
  
  <p>my code is:</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_REFERER, $baseUrl);
  curl_setopt($ch, CURLOPT_PROXY, $proxy[0]);
  curl_setopt($ch, CURLOPT_PROXYPORT, $proxy[1]);
  //curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_COOKIE         , $phpSId);
  curl_setopt($ch, CURLOPT_COOKIEJAR      , $cookie);
  curl_setopt($ch, CURLOPT_COOKIEFILE     , $cookie);
  curl_setopt($ch, CURLOPT_USERAGENT      , "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1");
  curl_setopt($ch, CURLOPT_TIMEOUT        , 40);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , 0);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , 0);
  curl_setopt($ch, CURLOPT_URL            , $url);
  curl_setopt($ch, CURLOPT_HEADER         , 1);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION , 1);
  curl_setopt($ch, CURLOPT_POST           , 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS     , $data);
  $result = curl_exec($ch);
  curl_close ($ch);
  unset($ch); 
  die($result);
  </code></pre>
  
  <p>Please help, thanks in advance</p>