I've asked about this before but didn't explain myself quite well.
Point is I've been working with cURL post requests and had no problem till now.
I'm trying to send a post request from my remote server:
$file = json_encode($mysqli_select_query);
$file = openssl_encrypt($file, 'AES-256-CBC', $key, 0, $iv);
$file = base64_encode($file);
$file is a select query from database encrypted with openssl_encrypt and then encoded into base64
$array = array(
'file' => $file,
'action' => 1,
);
$array = http_build_query($array);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://domain_name.com/absolute/path/to/script.php');
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $array);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch);
curl_close($ch);
but only thing I receive is
PHP Fatal error : Maximum execution time of 30 seconds exceeded
NOTE:
On previous cases what I did was sent a request to local server and retrieving information [mysqli select query] to put into my remote server and it worked well with no errors or warnings.
But know that I'm trying to send information from remote server to local and It's giving me the problems I mentioned before.
Does anyone know how to solve this?
UPDATE:
The Maximum execution time exceeded error line is the same as
$result = curl_exec($ch);
Does this mean that the problem could be on the external script?