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
Unfortunately, it doesn't look like file_get_contents()
really offers that degree of control. The cURL extension is usually the first to come up, but I would highly recommend the PECL_HTTP extension (http://pecl.php.net/package/pecl_http) for very simple and straightforward HTTP requests. (it's much easier to work with than cURL)