Subversion Repositories munaweb

Rev

Rev 180 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 180 Rev 182
Line 56... Line 56...
56
 * See http://php.net/manual/en/function.curl-setopt-array.php
56
 * See http://php.net/manual/en/function.curl-setopt-array.php
57
 */
57
 */
58
$curl_options = array(
58
$curl_options = array(
59
    // CURLOPT_SSL_VERIFYPEER => false,
59
    // CURLOPT_SSL_VERIFYPEER => false,
60
    // CURLOPT_SSL_VERIFYHOST => 2,
60
    // CURLOPT_SSL_VERIFYHOST => 2,
61
	CURLOPT_CONNECTTIMEOUT => 5,
61
	CURLOPT_CONNECTTIMEOUT => 10,
62
	CURLOPT_TIMEOUT => 30
62
	CURLOPT_TIMEOUT => 45
63
);
63
);
64
/**
64
/**
65
 * Decode POST parameters after building the http array. Send Header X-DECODE-PARAMS
65
 * Decode POST parameters after building the http array. Send Header X-DECODE-PARAMS
66
 */
66
 */
67
$decodeFlag = false;
67
$decodeFlag = false;
Line 193... Line 193...
193
}
193
}
194
 
194
 
195
// retrieve response (headers and content)
195
// retrieve response (headers and content)
196
$response = curl_exec($ch);
196
$response = curl_exec($ch);
197
if (curl_errno($ch)) {
197
if (curl_errno($ch)) {
198
    error_log("Curl error: " . curl_error($ch) . " (" . curl_error($ch) . ")");
198
    error_log("Curl error: " . curl_error($ch) . " (" . curl_errno($ch) . ")");
199
    header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
199
    header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
200
    header('Status: 404 Not Found');
200
    header('Status: 404 Not Found');
201
    $_SERVER['REDIRECT_STATUS'] = 404;
201
    $_SERVER['REDIRECT_STATUS'] = 404;
202
    exit;
202
    exit;
203
}
203
}