'Length required', when posting data with cURL
问题 I keep getting a <h1>Length required</h1> error, when submitting a post string to a server. $cookie = "Secret cookie data here"; $searchData = array( '__EVENTTARGET' => 'ctl00$main$btn', 'ctl00$main$tbMNr' => $_GET['smth'], 'ctl00$main$tbMb' => $_GET['smthElse'], '__VIEWSTATE' => 'smthElseHere' ); // Commenting this out, as suggested by user lonesomeday //foreach ($searchData as &$elem) // This should not be necessary // $elem = urlencode($elem); // create a new cURL resource $fields = http