Código PHP:
<?php
session_start();
$busqueda = $_POST[inputQuickSearch];
$cookie_file_path = "file.txt";
//$strCookie = 'PHPSESSID=' . session_name() . '; path=/';
$strCookie = 'PHPSESSID=' . $_COOKIE['PHPSESSID'] . '; path=/';
session_write_close();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"http://www.pagina.com/buscador/");
curl_setopt($ch, CURLOPT_COOKIE, $strCookie );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "Search=$busqueda");
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$html = curl_exec ($ch);
curl_close($ch);
?>
Gracias de antemano !