title: PHP - download pdf file from link and save in local file folder
body: <p>I am trying to get through an API, a live open access pdf file, and then download that file to my server. 
  However the PDF file does not end with a ".pdf" extension but is encapsulated in a more complexe url:
  <a href="http://aip.scitation.org/doi/pdf/10.1063/1.4996175" rel="nofollow noreferrer">http://aip.scitation.org/doi/pdf/10.1063/1.4996175</a>
  A web browser would simply ask to open or save it as a PDF file, whereas my script cannot translate it as such.
  How can I make my PHP script recognize this url as a PDF file?
  Thanks in advance.
  Olivier</p>