title: facebook image save curl
body: <p>The size of the save images  0 kb </p>
  
  <p>Working code, except facebook       </p>
  
  <pre><code> function imagedownload($url,$saveto){
                  $ch = curl_init ($url);
                  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
                  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
                  curl_setopt($ch, CURLOPT_HEADER, false);
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
                  curl_setopt($ch, CURLOPT_POST, true);
                  curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
                  $result = parse_url($url);
                  curl_setopt($ch, CURLOPT_REFERER, $result['scheme'].'://'.$result['host']);
                  curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0');
                  $raw=curl_exec($ch);
                  curl_close ($ch);
                  if(file_exists($saveto)){
                  unlink($saveto);
                  }
                  $fp = fopen($saveto,'x');
                  fwrite($fp, $raw);
                  fclose($fp);
                  }
  
                  $url="http://scontent-frt3-1.xx.fbcdn.net/v/t1.0-0/cp0/e15/q65/p320x320/13700038_850487491753797_6227258625184891703_n.jpg?oh=793ecde8db1a8e65789534907d08b25e&amp;oe=57F1DDFF";
  
                  $konum="images/"
  
                  $yolla=imagedownload($url,$konum);
  </code></pre>
  
  <p>The size of the save images  0 kb </p>
  
  <p>Working code, except facebook  </p>