Cuando necesito mandar variables por POST usando CURL hago algo así:
Código PHP:
$curl = curl_init();
$url = "http://visionweb.occourts.org/Vision_Public/SearchCase.do";
curl_setopt($curl, CURLOPT_URL, $url);
$postdata = "caseNbr=".$caseNumber;
$postdata .= "&action=Search";
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($curl, CURLOPT_COOKIEFILE, $cook_file);
curl_setopt($curl, CURLOPT_COOKIEJAR, $cook_file);
$str = curl_exec($curl);
//echo $str;
Código HTML:
<form action="/search" name="navbarsearch"> <input type="hidden" name="stage" value="results"/> <input type="hidden" name="mode" value="search"/> <input id="matchKeywords" class="keywordsdark" type="text" onblur="javascript:removeObjInFocus();" onfocus="javascript:setObjInFocus( 'matchKeywords' );" maxlength="rc0" name="keywords"/> <select id="matchType" name="domain"> </select> <a href="javascript:document.navbarsearch.submit();"> <img class="header_footer_icon search_icon" alt="search" src="/media/images/spacer.gif"/> </a> </form>
![Stress](http://static.forosdelweb.com/fdwtheme/images/smilies/stress.png)
Alguien sabe y tiene 1 segundo ?