Новичок
Покинул форум
Сообщений всего: 1
Дата рег-ции: Сент. 2017
Помог: 0 раз(а)
|
Хорошо погуглив я не нашла того, что могло бы мне помочь в моей непростой ситуации.
Мне необходима авторизация на сайте. вот так авториризуюсь:
PHP:
скопировать код в буфер обмена
$postData = ['email' => $login, 'password' => $password, '_csrf' => $csrf]; CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postData, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_SSL_VERIFYHOST => FALSE, CURLOPT_REFERER => $url, CURLOPT_FOLLOWLOCATION => false, CURLOPT_COOKIEJAR => "cookie.txt", CURLOPT_HEADER => true ));
Куки сохраняются в файл и я реша зайти в личный кабинет с помощью этих кук
PHP:
скопировать код в буфер обмена
//curl_setopt($ch, CURLOPT_URL, $baseUrl); //curl_setopt($ch, CURLOPT_COOKIE, $cookie); //curl_setopt($ch, CURLOPT_HTTPHEADER,$header); //curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_USERAGENT , $_SERVER['HTTP_USER_AGENT']); //curl_setopt($ch, CURLOPT_CERTINFO, 1);
и ничего не происходит.
var_dump(curl_getinfo($ch))
выводит
CODE ( htmlphp):
скопировать код в буфер обмена
["url"]=> string(38) "https://peek-cloppenburg.at/myaccount/" ["content_type"]=> NULL ["http_code"]=> int(301) ["header_size"]=> int(171) ["request_size"]=> int(509) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(0.393874) ["namelookup_time"]=> float(0.124593) ["connect_time"]=> float(0.189386) ["pretransfer_time"]=> float(0.32949) ["size_upload"]=> float(0) ["size_download"]=> float(0) ["speed_download"]=> float(0) ["speed_upload"]=> float(0) ["download_content_length"]=> float(0) ["upload_content_length"]=> float(-1) ["starttransfer_time"]=> float(0.393856) ["redirect_time"]=> float(0) ["redirect_url"]=> string(42) "https://www.peek-cloppenburg.at/myaccount/" ["primary_ip"]=> string(14) "107.154.113.64" ["certinfo"]=> } ["primary_port"]=> int(443) ["local_ip"]=> string(10) "172.18.0.4" ["local_port"]=> int(39352) ["request_header"]=> string(509) "GET /myaccount/ HTTP/1.1 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Host: peek-cloppenburg.at Accept: */* Cookie: did=s%3AYJLHZfp19X2Xg1SMl5QgclJhZ3OXSWDX.xmrjzl0EAq03xhBK0BVNA1%2FaLSPxWBGkTRYi17Ff8zg; incap_ses_800_753894=U7YzMaOeoRWdhkmVxysaC5+nzFkAAAAARnXvDWLLtFcI8pyBxfWcgw==; nlbi_753894=WLZtMv6ghGQWCoeBtErIoQAAAAC0JomeACpf2kSthAPhpIaN; visid_incap_753894=AboDi8lZQ5SMSc9u4Kc8V5+nzFkAAAAAQUIPAAAAAAAc9DIkTvu8kjY+Hw/aYh1x " }
вывод $result выводит
CODE ( htmlphp):
скопировать код в буфер обмена
HTTP/1.1 301 Moved Permanently Location: https://www.peek-cloppenburg.at/myaccount/ Content-Length: 0 Strict-Transport-Security: max-age=31536000 Connection: close
как мне авторизоваться?! пробовала целиком все заголовки отправлть, по частям, и даже дописывала в файл кук данные....
ББъюсь с задачей уже неделю.
Мне просто необходима ваша помощь.
|