Получение оценок школьника в сетевом городе ИРТЕХ

Task owner: directman, Екатеринбург - Россия
Current state: New Development

Получение оценок школьника в сетевом городе ИРТЕХ

пока не получается авторизоваться на сайте

Сценарий и явки пароли:

php $cookie_file = ROOT . 'cached/starline_cookie.txt'; //в этом файле будет храниться сессия
//$cookie_file = 'dialog_cookie.txt'; //в этом файле будет храниться сессия
// STEP 1 -- LOGIN

$url = 'http://eda.lyceum130.ru/asp/postlogin.asp'; // ссылка, по которой нам надо зайти
// задаём поля, которые будут отправлены при логине     
$fields = array(
'VER'=>'598620975',
'PW2'=>'b6e21e171d0840ba437679dc65f430a8',
'LT'=>'579475287',
'LoginType'=>'1',
'ECardID'=>'',
'CID'=>'2',
'SID'=>'66',
'PID'=>'-1',
'CN'=>'3',
'SFT'=>'2',
'SCID'=>'1',
'UN'=>'оСанниковД1',
'PW'=>'b6e21e'

//    'LoginForm[login]' => gg('balance.StarlineLogin'), // номер телефона
//    'LoginForm[rememberMe]' => 'on', 
 //'LoginForm[pass]' =>  gg('balance.StarlinePass')

);

//print_r($fields);
echo "<br>";
$fields_string = '';
foreach ($fields as $key => $value) {
    $fields_string .= urlencode($key) . '=' . urlencode($value) . '&';
}
//rtrim($fields_string, '&');
//echo $fields_string."<br>";
$fields_string=substr ($fields_string,0,-1);
//echo $fields_string."<br>";

$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
//curl_setopt($ch, CURLOPT_POST, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Encoding:gzip, deflate',
'Accept-Language:ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control:max-age=0',
'Content-Length:197',
'Content-Type:application/x-www-form-urlencoded',
'Cookie:ASPSESSIONIDCCCACRTS=OCHHFOOAEKHGKCEEAAILKDCM; ASPSESSIONIDAACDBQTS=AGLCGIIAKGKEDFPKPKPOENML; ASPSESSIONIDCCACBRTT=BCBNEEFBNIHMPOJFMFJEDHPI; ASPSESSIONIDACACCQTS=IGNPLKDBCGGHCGCFDLEKMKBO; ASPSESSIONIDACADBRTT=PAGCMHABOFPGAOLEPBHCNEMB; ASPSESSIONIDAACDBQTT=BHFCNBKAJLDCLICNBEGIKFFF; ASPSESSIONIDAADBDRSS=MMLFKJDCNDCJBMDGGCLMMKAB; ASPSESSIONIDACDCBQST=CDCLCDFCIGIADMEBFDELFLLH; ASPSESSIONIDACBDDQSS=DKDGKGACFCECLINHMEECMCPL; ASPSESSIONIDAADDDRSS=FDEGLAKBLNBMJDGMHEEKPFAH; ASPSESSIONIDACDCARSS=CEOPKDNBIGFOIBLDGACNNPLJ; ASPSESSIONIDACADCQST=IJKCEKLBDPPHIBHHKLCGHGFD; ASPSESSIONIDCAACCQTT=DDNICGICBMHEOMNACOIHNFEE; ASPSESSIONIDAAADDRTT=LHMBJPJCLJEAGKHJPJFNDKFJ; ASPSESSIONIDCCDDARTT=FAMGDACCBKNOFEKOBOBIEKCO; ASPSESSIONIDCACDDRTS=MJEOACFDIHAKKLHBMCMGHOPG; ASPSESSIONIDCCCABRTT=BLEKHLGDKCFLMAPJKMBBOCLH; ASPSESSIONIDACADCRTT=BBDFBPBDNFHGHBECIPLEACGA; ASPSESSIONIDCABBDRSS=JJJOAFIDAINKPIPNCGGLBCKG; ASPSESSIONIDCCBCCRTS=DOHJPNBAMNIJDEPFIINJJFAA; ASPSESSIONIDACBACRTT=OKPKHOJDHJCECNMNHHEDCKCD; ASPSESSIONIDACBADRSS=KKEDAILDFOGLELFANOPDNCJP; ASPSESSIONIDCAAADRTT=CJGAHBNDPMEIOLGLOACGMGDB; ASPSESSIONIDAACCBQSS=OBEPOAFAOAKNNCJBNJNLICNN; ASPSESSIONIDCADDCSRT=PLHMPKODNBDLNNEKEKGIGHDC; ASPSESSIONIDCAABCQST=GGEJFANADCADBNCHNIGFINGA; ASPSESSIONIDCADDBRSS=HCNPDKOAJELBCEKDFNANLIFG; ASPSESSIONIDCABCCRSS=AFBEOGLABCBBFICNIGBODMBH; ASPSESSIONIDACBAAQSS=EKBIFNJAKFEKNPCBHPJFLMHC; TTSLogin=SID=66&CID=2&PID=%2D1&SCID=1&BSP=0&CN=3&SFT=2; ASPSESSIONIDAACCDQTS=GGPLEDABKDLLCKFGKPGHEKKJ; ASPSESSIONIDCABACQST=GADLODIAFNBFOFKJPGPKKBNE; ASPSESSIONIDACAADQSS=AAOMCFDCNDGBNHJFNBHEKGHF; ASPSESSIONIDCABDDQSS=IOMHKBICMGOEPOCILHMHOOPI; ASPSESSIONIDCAAABRTT=FDJCKELCOPCNLIPECANMGPAO; ASPSESSIONIDACBBAQST=KINPAOMCDAHHKJDNBMGAPGNM; ASPSESSIONIDCCCDBRTT=PPOGKHOCILJCLLNEFDLFBIOK; ASPSESSIONIDAADDARTT=NLEPINEDHJLMDLIPJHMFABBB; ASPSESSIONIDACDDAQTT=JBGEAEDDLOJKILCKOBBNGPCA; ASPSESSIONIDCACCBRST=ABEHJKBDOABPOGIEKINLAGKC; ASPSESSIONIDACACBQTS=EIJJIAIDDIGIHOFBJLGIHGHI; ASPSESSIONIDCCDADRST=HEPNPJJDMFHKDAAKIIHILJBB; ASPSESSIONIDCCACDQTS=ABKAAHGDMOJFDCKKIJHDDJOA; ASPSESSIONIDCACBARST=OLJEIDLDBHGGKAEJPAONCCIH; ASPSESSIONIDCCADARST=HCKNHJBABLMALLLDEHICAODG; ASPSESSIONIDCCBDBQTT=MIICPMMDIMDJBNPGKAPMNAIF; _ym_uid=1513136265667279584; ASPSESSIONIDACDBDQST=LLNLOPPDBOBMJFNGCABJOKPP; ASPSESSIONIDAACCARSS=EJGCPCDAEEDJLONNAHAFPAPI; ASPSESSIONIDCCBACRTS=CCMBHMEANPEPNANKPAJJAMJC; ASPSESSIONIDACADCRTS=CKNPNFGAHDJOIPDLEPKOEECO; ASPSESSIONIDAAAACQSS=OAIJNLMAJKMKEDKPLJHPHBOL; ASPSESSIONIDCAADBRTT=IPBLMOPANKLPPKJIJMHBMOGL; ASPSESSIONIDAAAADQTT=OMOFGFOABOOFPMNNAHEEGPFN; ASPSESSIONIDAABCBRTT=BJDGGCLAECGMABNKGECHLJML; ASPSESSIONIDCCCCARSS=MNDKNIJAOGEPFINAMOGGGKCF; ASPSESSIONIDACCACRSS=MJOBMEGBFDFDCACLNAEOKFDB; ASPSESSIONIDAACCARTT=NBFJFOHBHJILFGHGFJCKGGGM; ASPSESSIONIDCCADBQTT=GAOKFIBBCFLLOCLGHOIAFEDB; ASPSESSIONIDACCCAQST=DCOIMBDBLONBBIONBHAPBPOM; ASPSESSIONIDAABDCQST=GJONBGBDKNMFMKJCALKAGEBB; ASPSESSIONIDCACCBQTS=CNALIPCDAKOCKCPABOJJGPDI; ASPSESSIONIDCACDAQTS=KOFCDDOCPNOHMOKJADEOBKGK; ASPSESSIONIDCCDCARTS=LLBADNHCMFBMGIFPMJLBGDHK; ASPSESSIONIDAABDBQSS=CDPFKJMCIPACELJBNBKMMEJC; ASPSESSIONIDCADBBQST=OCEFAPKDHAIPDIFEOPIFIOAA; ASPSESSIONIDCABCAQST=FMFGICGDILKPFOHJMENOMKPB; ASPSESSIONIDCACACRTS=AHMLBMHDIHLOMKKPFENJBHOI; ASPSESSIONIDACCBARST=GMBKHFJDCHNLNBPIPFCNMKEH; ASPSESSIONIDACDCCTQT=HKDAACODBMPMLNAJENPJJIBP; ASPSESSIONIDCCDCBRSS=BIBEPHEAEGOKOPNKDEIDNJCB; ASPSESSIONIDACBBDQTS=HNBOGLPDDJEGDLHLOMOPFGDG; ASPSESSIONIDCACCCSRS=GEEFHIMDFHBBBGPNONJDHLMG; ASPSESSIONIDCACBDRTT=LGCCGBGAEBBFGONDNHLIPNPC; ASPSESSIONIDAAACARST=DIGNOKHALACEFNAHPBEPPFGP; ASPSESSIONIDACCADQSS=LOBIHOCADPHAIHCGFJHFKLNE; ASPSESSIONIDCCDBDQTT=LGGMFEJAGFDJBAEGIGKLLJND; ASPSESSIONIDCCCABQST=EEGHONKAOHBLPHGBLAEIOKIK; ASPSESSIONIDCCACAQSS=GOBEOAOAPKNECMKCIMLCNFFN; ASPSESSIONIDCCADBQTS=BPMNEKPAMPCNDEGCBOINEBIL; _ym_isad=2; ASPSESSIONIDCABADQST=GPFGGHMADDDELMDCAEBMMCCO; ASPSESSIONIDACABCRTT=AIBMNDBBIDBILJDHENNCJGMJ; NSSESSIONID=895636493898858670330478; ESRNSec=ESRNSECR%2D920009568=%2D1809242208%2D%2D1692954720&ESRNSECR77757376=1438978208%2D%2D1141792704&ESRNSECR%2D176808288=4125920%2D1170464096&ESRNSECR1702757856=1991957728%2D%2D1266211008&ESRNSECR%2D1357182304=1684516512%2D%2D954298784&ESRNSECR849960192=%2D1775664480%2D%2D43324096&ESRNSECR%2D1328568256=1544505792%2D%2D1063186464&ESRNSECR%2D504361088=%2D204216192%2D%2D1834414944',
'Host:eda.lyceum130.ru',
'Origin:http://eda.lyceum130.ru',
'Proxy-Connection:keep-alive',
'Referer:http://eda.lyceum130.ru/about.asp?AL=Y',
'Upgrade-Insecure-Requests:1',
'User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36'

));

$result = curl_exec($ch);
curl_close($ch);
echo $result;

//step2 

$url = 'http://eda.lyceum130.ru/asp/Curriculum/Assignments.asp'; 
// ссылка, по которой нам надо зайти
// задаём поля, которые будут отправлены при логине     
$data="AT=285636493898963146306384&VER=895091817";

$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch, CURLOPT_URL, $url);
//curl_setopt($ch, CURLOPT_POST, count($fields));
//curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_POST, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0',
'Accept: application/json, text/javascript, */*; q=0.01',
'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
'X-Requested-With: XMLHttpRequest'
));

//$result = curl_exec($ch);
//curl_close($ch);
echo $result;

@unlink($cookie_file);

 
Task budget: 66.17 SM
 
(0)
 
Subscribe to updates (0)
 

Recent supporters

directman 60.00 SM
directman 6.17 SM

Task ideas

You can help with project improvement by sharing your ideas or by voting for ideas already added.

Other tasks by the author

Создание плагина для устройств Itead Sonoff без модификации стоковых прошивок
Интегрировать экшены гугл асистента
Получение баланса МТС
доработать сценарий импорта с сайте starline-online.ru