tags:

views:

24

answers:

0

Hi,

I have a PHP download page. When i submit a form to the page, it prompts a download window (save,open,run..). How do I get header of the download page in php? I tried to use curl, but the result was empty.

$post_data = "var=value";

$agent = curl_init();
curl_setopt($agent,CURLOPT_URL,MY URL);
curl_setopt($agent, CURLOPT_POST, true); 
curl_setopt($agent, CURLOPT_POSTFIELDS, $post_data);  


$result = curl_exec($agent);