Закрыт

Convert 20 lines of PHP TO ASP.NET

I need this code to be converted to asp.net :

<?php

$plate = "A71EPD";

$url="[url removed, login to view]";

$cookie = "[url removed, login to view]";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");

curl_setopt($ch, CURLOPT_TIMEOUT, 60);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);

curl_setopt($ch, CURLOPT_REFERER, $url);

$result = curl_exec($ch);

$l_url1 = explode('<form method="post" id="homeForm" action="', $result);

$l_url2 = explode('"><input type="hidden" name="persist_affiliateid" value="" />', $l_url1[1]);

$l_url = $l_url2[0];

$an_id1 = explode('<input type="hidden" name="persist_SubscriberID" value="', $result);

$an_id2 = explode('" />', $an_id1[1]);

$an_id = $an_id2[0];

$token1 = explode('[url removed, login to view]', $l_url);

$token = $token1[1];

$postdata =

"&persist_affiliateid=" . ""

. "&persist_SubscriberID=" . $an_id

. "&persist_ReturnPath=" . "Homepage"

. "&AutoLocateID=" . $token

. "&VRM=" . $plate

. "&DoLogin=" . "Login"

. "&PasswordNotReset=" . "True"

. "&AutocheckNow.y=" . "yes"

. "&Confirmed=" . ""

. "&DoHomepageLogin=" . "Login"

. "&ConfirmVRM=" . ""

. "&ProductId=" . ""

. "&Homepage=" . ""

. "&submit=Login%20into%20Account";

curl_setopt($ch, CURLOPT_URL, $l_url);

curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);

curl_setopt($ch, CURLOPT_POST, 1);

$final_result1 = curl_exec($ch);

$final_result1 = explode('<div class="vehicleDescResult">', $final_result1);

$final_result2 = explode('<br>', $final_result1[1]);

$make = $final_result2[1];

$model = $final_result2[2];

$color = $final_result2[3];

if( $make ){

echo '{"car": { "RegNo": "' . $plate . '", "Make": "' . $make . '", "Model": "' . $model . '", "Color": "' . $color . '" }}';

}

else{

echo '{"car": { "RegNo": "unknown", "Make": "unknown", "Model": "unknown", "Color": "unknown" }}';

}

curl_close($ch);

?>

Квалификация: .NET, PHP

Показать больше php color code, car id, php net, rv, post form hidden, windows 2012 https, asp form login, convert php form, php form convert, php post value, form hidden submit, php action form, class convert, php form action, form convert, php value post, form post hidden, net gecko, gecko model, form hidden post value

О работодателе:
( 3 отзыв(-а, -ов) ) Cluj Napoca, Romania

ID проекта: #2459047

9 фрилансеров(-а) в среднем готовы выполнить эту работу за $8/час

shuvrapintu

Hi, Thanks for posting this transparent and simple task. We need to to change the curl syntax and change the parsing method. Please accept to start right away. Estimated time for this rask is : 1 HOUR

$8 USD / час
(136 отзывов(-а))
6.6
mrnewict

Hi, please check PM!

$8 USD / час
(30 отзывов(-а))
5.4
gaddas86

Hi, It's easy job - just have to change the curl to the webrequest and fix the parsing. I can do it in ~1 hour as I'm expert in web scraping.

$8 USD / час
(39 отзывов(-а))
4.7
prakher

can do it now. waiting for acceptance.

$8 USD / час
(9 отзывов(-а))
4.5
Fitzgeraldz

A warm greeting, I work as a Professional Developer I have 7 years experience I program it so in c, c++, c#, java, vb, matlab, asm, python, AutoLISP, aspx, php, html, dhtml, css, ajax, jquery, mvc, MSSQL, MySQL, Silver Больше

$8 USD / час
(13 отзывов(-а))
4.3
krkcare

Hi, We have gone through your requirement. We can do this. We have sent you a private message. Kindly check that. Thanks Shalini

$8 USD / час
(3 отзывов(-а))
3.6
claretalabs1

We are an IT organization; dealing with Software development since last 4+ years of our existence. We maintain absolute confidentiality. We had worked as result oriented professionals. Our objective is to give 100% Больше

$5 USD / час
(0 отзывов(-а))
0.0
hayatk14

I will give you project on time.

$10 USD / час
(0 отзывов(-а))
0.0
kooshasl

Project should be ready in 1hours after bid accept.

$10 USD / час
(0 отзывов(-а))
0.0