thanks for help..
I'm using cURL for submit via POST a PHP file
$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://www.******.php',
CURLOPT_TIMEOUT => 5000,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => array(
val1 => 3,
val2 => 1
)
));
$resp = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
echo $httpCode;
curl_close($curl);
The php file response with this:
<META HTTP-EQUIV='Refresh' CONTENT='1; URL=/******.pdf'>
My script refresh the page searching for the file .pdf in my domain (error 404).. I want that the script download this file in my server in a specific path with the original name..
Could anyone help me?