Hello! Using curl, I get a header file that lies along this path http://zakupki.gov.ru/223/purchase/public/download/download.html?id=3324768 . Now I need to get from the header the file name or file extension. Header has this form
HTTP/1.1 200 OK Server: nginx Date: Sun, 24 May 2015 12:42:09 GMT Content-Type: application/download Content-Length: 648192 Connection: close Set-Cookie: route223p7=0; Domain=zakupki.gov.ru; Path=/223 Content-Disposition: attachment; filename="%D0%9A%D0%BE%D0%BD%D0%BA%D1%83%D1%80%D1%81%D0%BD%D0%B0%D1%8F%20%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%86%D0%B8%D1%8F%2070-%D1%8D%D1%82%D0%B7%D0%BF.doc"; filename*=UTF-8''%D0%9A%D0%BE%D0%BD%D0%BA%D1%83%D1%80%D1%81%D0%BD%D0%B0%D1%8F%20%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%86%D0%B8%D1%8F%2070-%D1%8D%D1%82%D0%B7%D0%BF.doc Content-Language: en-US Expires: Sun, 24 May 2015 12:57:09 GMT Cache-Control: max-age=900 Cache-Control: public How do I get the value of filename, or .doc. Thank you in advance.
get_headersfunction has long been available for parsing received headers. But if you want to design bikes, then go ahead. - u_mulder