+
+ if($cookiejar) {
+ curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
+ curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
+ }
+
+// These settings aren't needed. We're following the location already.
+// @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
+// @curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
+