$url = 'http://localhost/search.php';
$data = array(
'q1' => 'text1',
'q2' => 'text2',
);
$options = array('http' => array(
'method' => 'POST',
'content' => http_build_query($data),
));
$contents = file_get_contents($url, false, stream_context_create($options));