taymedee
taymedee

Reputation: 582

what does `curl -e` or `curl --referer` mean?

I've seen some example :-

curl --referer http://example.com/bot.html http://www.cyberciti.biz/

what is the different if I use curl http://www.cyberciti.biz/

shell script type:-

curl -e http://example.com/bot.html \ 
'http://www.cyberciti.biz/'

what is \ for?

Upvotes: 26

Views: 57409

Answers (1)

Mike Furlender
Mike Furlender

Reputation: 4019

From the man page of cURL

-e, --referer <URL>

(HTTP) Sends the "Referrer Page" information to the HTTP server. This can also be set with the -H, --header flag of course. When used with -L, --location you can append ";auto" to the --referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial --referer.

Essentially this tells the server which page sent you there.

Upvotes: 45

Related Questions