Improved stability of the submit feature to sustain large batches.
This commit is contained in:
parent
40202ea948
commit
c7d3173080
3 changed files with 26 additions and 14 deletions
5
boot.php
5
boot.php
|
@ -227,11 +227,12 @@ function t($s) {
|
|||
|
||||
|
||||
if(! function_exists('fetch_url')) {
|
||||
function fetch_url($url,$binary = false) {
|
||||
function fetch_url($url,$binary = false, $timeout=20) {
|
||||
$ch = curl_init($url);
|
||||
if(! $ch) return false;
|
||||
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, max(intval($timeout), 1)); //Minimum of 1 second timeout.
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);
|
||||
curl_setopt($ch, CURLOPT_MAXREDIRS,8);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue