guys. I have a this comples curl request, which encoded in PHP:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://ift.tt/2biHlOv");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "sEcho=10&iColumns=9&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&mDataProp_4=4&mDataProp_5=5&mDataProp_6=6&mDataProp_7=7&mDataProp_8=8&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&sSearch_5=&bRegex_5=false&bSearchable_5=true&sSearch_6=&bRegex_6=false&bSearchable_6=true&sSearch_7=&bRegex_7=false&bSearchable_7=false&sSearch_8=&bRegex_8=false&bSearchable_8=false&code=14045680®date=~&sSearch_3=&sSearch_4=&q_ver=arbitr&pdate=~&aucdate=~&aucplace=&ptype=0&pkind=0&price=~&ckind=");
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = "Cookie: __utma=83545032.2036292352.1472030481.1472056109.1472059456.3; __utmc=83545032; __utmz=83545032.1472059456.3.3.utmcsr=vgsu.arbitr.gov.ua|utmccn=(referral)|utmcmd=referral|utmcct=/pages/157";
$headers[] = "Origin: https://ovsb.ics.gov.ua";
$headers[] = "Accept-Encoding: gzip, deflate, br";
$headers[] = "Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4";
$headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36";
$headers[] = "Content-Type: application/x-www-form-urlencoded; charset=UTF-8";
$headers[] = "Accept: application/json, text/javascript, */*; q=0.01";
$headers[] = "Referer: http://ift.tt/2bPJwqK";
$headers[] = "X-Requested-With: XMLHttpRequest";
$headers[] = "Connection: keep-alive";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
How can I execute this in C#? Many thanks !
Aucun commentaire:
Enregistrer un commentaire