How to use Curl from the command line to send a GET method using cookies

`I have requests that I have to send using windows xp

GET https://website.com/index.aspx?typeoflink=**[HERE-VARIABLE-FROM-FILE]**&min=1 HTTP/1.1
Accept: */*
Referer: https://website.com/index.aspx?chknumbertypeoflink&min=1
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: website.com
Connection: Keep-Alive
Cookie: cookieverrylongstringD%FG^&N*MJ( CVV%^B&N*&*(NHN*B*&BH*&H

and this cone code is here

   set TYPEOFLINK=foo
    curl https://website.com/index.aspx?typeoflink=%TYPEOFLINK%&min=1 > savedfile

How can I get curls for sending cookies and referrals and all the rest?

Thanks in advance Adam

+3
source share
2 answers

I just found out about cURL and the tutorial was a big help. I think it covers most of what you are looking for:

http://curl.haxx.se/docs/httpscripting.html

+5
source
 curl --insecure -c cookie.txt --url "https://website.com/index.aspx" --data "typeoflink=**[HERE-VARIABLE-FROM-FILE]**&min=1"

- swtch - , -c cookie cookie cookie.txt. , cookie, -b, :

 curl --insecure -b cookie.txt --url "https://website.com/index.aspx" --data "typeoflink=**[HERE-VARIABLE-FROM-FILE]**&min=1"
+5

Source: https://habr.com/ru/post/1767010/


All Articles