第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何使用Curl和SSL和cookie登錄

如何使用Curl和SSL和cookie登錄

PHP
肥皂起泡泡 2019-10-21 14:27:31
我一直在嘗試使用curl登錄barnesandnoble.com移動(dòng)網(wǎng)站,到目前為止還沒有運(yùn)氣。我返回的頁面沒有任何錯(cuò)誤,它再次將我的電子郵件默認(rèn)設(shè)置為登錄頁面的電子郵件輸入表單框(使用print $ result返回的表單)。通過更改LOGINURL指向eBay的登錄名,相同的代碼實(shí)際上可以使我正確地進(jìn)入ebay。唯一的區(qū)別是barnesandnobles是https://,而ebay登錄是http://另外,我相信barnes網(wǎng)站是asp / aspx,所以我不知道該如何處理cookie和_state在過去16小時(shí)內(nèi)嘗試調(diào)試時(shí),我們將提供任何幫助另外,我的cookie.txt是可寫的并且可以正常工作<?php    $cookie_file_path = "C:/test/cookie.txt";    $LOGINURL = "https://cart2.barnesandnoble.com/mobileacct/op.asp?stage=signIn";     $agent = "Nokia-Communicator-WWW-Browser/2.0 (Geos 3.0 Nokia-9000i)";    $ch = curl_init();     $headers[] = "Accept: */*";    $headers[] = "Connection: Keep-Alive";    $headers[] = "Content-type: application/x-www-form-urlencoded;charset=UTF-8";    curl_setopt($ch, CURLOPT_HTTPHEADER,  $headers);    curl_setopt($ch, CURLOPT_HEADER,  0);    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);    curl_setopt($ch, CURLOPT_URL, $LOGINURL);    curl_setopt($ch, CURLOPT_USERAGENT, $agent);    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);    $content = curl_exec($ch);     curl_close($ch);     unset($ch);     // NAME="path_state" value="6657403">    if(stristr($content,"path_state")){        $array1 = explode('path_state" value="',$content);        $content1 = $array1[1];        $array2 = explode('">',$content1);        $content2 = $array2[0];    }    $LOGINURL = "https://cart2.barnesandnoble.com/mobileacct/op.asp?stage=signIn";    $POSTFIELDS = "d_hidPageStamp=V_3_17&hidViewMode=opSignIn&stage=signIn&previousStage=mainStage&path_state=" .  $content2 . "&emailAddress=YOUREMAILHERE@gmail.com&acctPassword=YOURPASSWORD";    $reffer = "https://cart2.barnesandnoble.com/mobileacct/op.asp?stage=signIn"; 
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 438 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)