@ebroker; hocam bende hata verdi
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

kısmında. siz denedinizmi çalışıyormu sizde ?