-
Notifications
You must be signed in to change notification settings - Fork 503
Description
I am trying to fetch contents from
https://some.com/suggestions.php?q=kann
include('./Request/library/Requests.php');
Requests::register_autoloader();
$request = Requests::get('https://some.com/suggestions.php?q=kann',array('Accept' => 'application/json'));
echo json_encode($request->body);
Above code works fine when we run on localHost But I get
"500 Internal server error
PhP Error Shows
`
Fatal error: Uncaught exception 'Requests_Exception' with message 'cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received' in /home/admin/domains/domain.com/public_html/Request/library/Requests/Transport/cURL.php:277 Stack trace: #0 /home/admin/domains/domain.com/public_html/Request/library/Requests/Transport/cURL.php(120): Requests_Transport_cURL->process_response(false, Array) #1 /home/admin/domains/domain.com/public_html/Request/library/Requests.php(317): Requests_Transport_cURL->request('https://some.com...', Array, NULL, Array) #2 /home/admin/domains/domain.com/public_html/Request/library/Requests.php(194): Requests::request('https://some.com...', Array, NULL, 'GET', Array) #3 /home/admin/domains/domain.com/public_html/Request/examples/get.php(14): Requests::get('https://some.com...', Array) #4 {main} thrown in /home/admin/domains/domain.com/public_html/Request/library/Requests/Transport/cURL.php on line 277
`
when run on webserver, is there any way to fix this?