Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. Uncaught exception 'Guzzle\Http\Exception\CurlException' with message
  2. '[curl] 35: error:1407742E:SSL
  3. routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
  4. [url] https://somesite.com
  5.  
  6. <?php
  7. use GoutteClient;
  8. $client = new Client();
  9. $guzzle = $client->getClient();
  10. $guzzle->setConfig(
  11. array(
  12. 'curl.CURLOPT_SSL_VERIFYHOST' => false,
  13. 'curl.CURLOPT_SSL_VERIFYPEER' => false,
  14. )
  15. );
  16.  
  17. $client->setClient($guzzle);
  18. $crawler = $client->request('GET', 'https://somesite.com'); // IT FAILS HERE
  19.  
  20. [curl] 35: Unknown SSL protocol error in connection to website.com:443
  21.  
  22. use GoutteClient;
  23. $client = new Client();
  24. $guzzle = new GuzzleClient('https://somesite.com', array(
  25. 'curl.options' => array(
  26. 'CURLOPT_SSLVERSION' => 1,
  27. )
  28. ));
  29. $client->setClient($guzzle);
  30. $crawler = $client->request('GET', 'https://somesite.com');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement