Well, i researched a bit about cURL and played around and these are the results:
1.
There's an explanation for the very short timeout times for cURL: "If you want cURL to timeout in less than one second, you can use CURLOPT_TIMEOUT_MS, although there is a bug/"feature" on "Unix-like systems" that causes libcurl to timeout immediately if the value is < 1000 ms with the error "cURL Error (28): Timeout was reached"." you can read more here, posting of Steve Kamerman: http://www.php.net/manual/en/function.curl-setopt.php. The bottom line of this is to use CURLOPT_NOSIGNAL on unix systems. I think you shold integrated this option in GS.
curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
2.
Accessing common websites via cURL from my webhoster works.
API via curl
API timeout: 500
Array
(
[url] => http://www.heise.de/
[content_type] => text/html; charset=utf-8
[http_code] => 200
[header_size] => 261
[request_size] => 51
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.363236
[namelookup_time] => 0.002202
[connect_time] => 0.006634
[pretransfer_time] => 0.006668
[size_upload] => 0
[size_download] => 100450
[speed_download] => 276541
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => 0
[starttransfer_time] => 0.351285
[redirect_time] => 0
[certinfo] => Array
(
)
[redirect_url] =>
)
Curl Data: [...]
Duration: 0.36471
3.
Reading GS extend base does not work
get_api_details: core
get_api_details: http://get-simple.info/api/start/v3.php?v=3.2.0
cache check for http://get-simple.info/api/start/v3.php?v=3.2.0 1b904d26e4e8c9e2dde21d9411314f59.txt
API via curl
API timeout: 500
Array
(
[url] => http://get-simple.info/api/start/v3.php?v=3.2.0
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.500172
[namelookup_time] => 2.1E-5
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)
[redirect_url] =>
)
Curl Data:
cURL error number:28
cURL error:connect() timed out!
Duration: 0.50041
4. Looks like 100ms timeout is too short. Maybe it would be best to make this option configurable via gsconfig.
Even if i only try to get the GS website i get this:
get_api_details: plugin i18n_base.php
get_api_details: http://get-simple.info/api/extend/?file=i18n_base.php
cache check for http://get-simple.info/api/extend/?file=i18n_base.php a530edfa8073b06f07218c5b4a0472d6.txt
API via curl
API timeout: 900
Array
(
[url] => http://get-simple.info/
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.900459
[namelookup_time] => 0.002184
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)
[redirect_url] =>
)
Curl Data:
cURL error number:7
cURL error:couldn't connect to host
Duration: 0.92894