Prova aggiungendo l'opzione per i reindirizzamenti

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);