Skip to content

Commit

Permalink
fix ssl issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ediathome committed Jun 27, 2019
1 parent fb06d55 commit bff5bbf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions classes/FakerCurler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ protected function curl_file()
$destination = trim($destination);

$file = fopen($destination, 'w+');

error_log('FakerCurler::curl_file from url: "'.trim($this->snapshot_user_url()).'"');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, trim($this->snapshot_user_url()));
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
# curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
# curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
# curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_TIMEOUT, 600);
curl_setopt($ch, CURLOPT_FILE, $file);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
error_log(print_r(curl_getinfo ($ch), true));
curl_exec($ch);
curl_close($ch);

Expand Down

0 comments on commit bff5bbf

Please sign in to comment.