Vĩ Kha Blog Posted November 19, 2015 Share Posted November 19, 2015 I'm logged into the site http://me.zing.vnAfter login, I get cookie of the site. But when I request to visit homepage and read source of the siteIf I add cookie then it display : http://www.upsieutoc.com/images/2015/11/19/untitled.jpgAnd when I don't add cookie then It display the source of the site when not logged inFunc scookie() Local $o = _WinHttpOpen("") Local $hConnect = _WinHttpConnect($o, "http://me.zing.vn/u/vikhablog") Local $hRequest = _WinHttpOpenRequest($hConnect, Default,"vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3") _Winhttpaddrequestheaders($hRequest,"User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:42.0) Gecko/20100101 Firefox/42.0") _Winhttpaddrequestheaders($hRequest,"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") _Winhttpaddrequestheaders($hRequest,"Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3") _Winhttpaddrequestheaders($hRequest,"Accept-Encoding: deflate") _Winhttpaddrequestheaders($hRequest,"Connection: keep-alive") _WinHttpAddRequestHeaders($hRequest, "Cookie: " & $Cookie) _WinHttpSendRequest($hRequest,"") _WinHttpReceiveResponse($hRequest) Local $s = Decode(_winhttpreaddata($hRequest)) _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($o) Tooltip($s,0,0) EndFunc Who can help me, please ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now