I've been trying to figure this out for ages, but just can't get my head around it. I'm trying to write a script which will generate a PDF copy of the Metro newspaper. As far as I can tell, their Flash application posts the data contained in the following file:
http://e-edition.metro.co.uk/YYYY/MM/DD/edition.xml(with YYYY, MM and DD set to the desired date), to the following script:
http://edition.pagesuite-professional.co.uk/create_pdf.aspx?which then generates the PDF and returns HTML code providing a link to the file. The file is generated on the fly with a name which does not correspond to anything guessable, so the script has to be run. In other words, there is no existing PDF you can hotlink to.
I can't for the life of me figure out how this is done. I've used Firebug to capture the POST request, and the details are below. There is quite a bit about this on the Internet, but most of the examples I found rely on PHP extensions which only seem to work on Windows, or are non-working pseudo-code.
Headers:Response Headers
Server Microsoft-IIS/6.0
X-Powered-By ASP.NET
X-AspNet-Version 2.0.50727
Cache-Control private
Content-Type text/html; charset=utf-8
Content-Length 226
Date Wed, 04 Nov 2009 20:10:06 GMT
Connection keep-alive
Vary Accept-Encoding
Request Headers
Host edition.pagesuite-professional.co.uk
User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-gb,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Referer
http://e-edition.metro.co.uk/2009/11/04/Data:Content-type: application/xml
Content-length: 2415