How do I set the headers of a request in PHP?

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Guest
Background info:
fopen and file_get_contents are currently disabled by my ISP.

Question:
I would like to load the contents of a file from another domain in PHP using something like XMLReader instead, however I do need to be able to set the headers of the request (in particular the value of a cookie in the header request).

cURL would have been awesome, but it appears to be disabled too. What is the easiest way to set the value of a cookie in an outgoing request?

If there are any alternatives to using cURL to setting the value of a cookie in a header request for a file, I would be open to using those too. Thanks!
 
Back
Top