Created February 13, 2013 15:54
Save sudar/4945588 to your computer and use it in GitHub Desktop.
Increase the curl timeout in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters <?php Copied from http://fatlabmusic.com/blog/2009/08/12/how-to-fix-wp-http-error-name-lookup-timed-out/ //adjustments to wp-includes/http.php timeout values to workaround slow server responses add_filter('http_request_args', 'bal_http_request_args', 100, 1); function bal_http_request_args($r) //called on line 237 { $r['timeout'] = 15; return $r; } add_action('http_api_curl', 'bal_http_api_curl', 100, 1); function bal_http_api_curl($handle) //called on line 1315 { curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 15 ); curl_setopt( $handle, CURLOPT_TIMEOUT, 15 ); } ?>You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4