r/programmingrequests • u/FlandersFlannigan • Apr 21 '17
HTTP Header Request Help
Hello,
I'm somewhat new to all of this, so apologies if this is ignorant, but I can't find the answer to my question anywhere. I have been trying desperately to change the HTTP Request headers of my php request using Guzzle and curl.
I've had no luck at all. I've tried many, many methods. Some of which I feel should have worked. I'm starting to think there's a piece of this puzzle that I just don't know. What I think is happening is this:
I'm outputting the results of getallheaders() -PHP- into the browser to see what my request headers are. They always come back the same thing.
I've tried using getallheaders() to output to the console, but it doesn't work. I think because it's an extension of apache, it will only work in the browser?
I also think the reason I can't change the request header is because Chrome is setting their own request header and if I were to do this solely through the console, I wouldn't run into this issue. Is this correct?
2
u/NoG5 Apr 22 '17
something like this?
getallheaders.php
curl_headers.php