With PHP, is it possible to send HTTP headers with file_get_contents() ?
I know you can send the user agent from your php.ini file. However, can you also send other information such as HTTP_ACCEPT, HTTP_ACCEPT_LANGUAGE, and HTTP_CONNECTION with file_get_contents() ?
Or is there another function that will accomplish this?
Actually, upon further reading on the
file_get_contents()function:You may be able to follow this pattern to achieve what you are seeking to, I haven’t personally tested this though. (and if it doesn’t work, feel free to check out my other answer)