Open sriducati opened 8 years ago
Are you running your code behind a firewall or proxy on the web server?
the remote server is probably using a newer TLS version than your webservers cURL supports (i.e. TLS v1.2).
If you are unable to update the webservers cURL, then set Requests_Transport_fsockopen as the preferred transport method with Requests::add_transport.
include('./Request/library/Requests.php');
Requests::register_autoloader();
Requests::add_transport('Requests_Transport_fsockopen')
$request = Requests::get('https://some.com/suggestions.php?q=kann',array('Accept' => 'application/json'));
echo json_encode($request->body);
Sadly overriding the preferred transport method does not work in this library (yet), so I forked my own and fixed Requests::add_transport() there: https://github.com/allanlaal/Requests
I've iniated a pull request too: https://github.com/rmccue/Requests/pull/258
I am trying to fetch contents from
Above code works fine when we run on localHost But I get
PhP Error Shows
`
`
when run on webserver, is there any way to fix this?