PHP cURL post without returning page content

aymn52

New Member
Is it possible to do a cURL post with PHP that will post my array of values and return only the curl_getinfo data but none of the page content? Here is an example of what I am currently using; it returns the page content into a variable.However, every time it returns the page content it uses a lot of bandwidth. I'm trying to reduce the amount of bandwidth I use; all I really need back is the curl_getinfo data.Would adding CURL_TIMECOND_IFMODSINCE accomplish this? (the page I'm posting to very rarely changes)\[code\]$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_TIMEOUT, 10);curl_setopt($ch, CURLOPT_POST, true);$post_data = http://stackoverflow.com/questions/3827884/array();$post_data["name"] = $name;$post_data["age"] = $age;curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);$output = curl_exec($ch);$info = curl_getinfo($ch);\[/code\]
 
Back
Top