Hvordan sende en header ved hjelp av en HTTP-forespørsel gjennom et curl-anrop?
Jeg ønsker å sende en header til Apache-serveren min på en Linux-boks. Hvordan kan jeg oppnå dette via et curl-anrop?
1320
3
man curl
:Eksempel:
Du kan se forespørselen som curl sendte ved å legge til
-v
-alternativet.I PHP:
eller du kan angi flere:
Bruk
-H eller --header
.Man-side: http://curl.haxx.se/docs/manpage.html#-H