I have this old piece of code (that still works) in file_get_contents form. However, file_get_contents isn\'t as customisable as curl.
file_get_contents
curl