in reply to Identifying PDF from URLs
listanand,
Is performance a requirement, or can you use brute force? You could write this in bash with 'wget' to slurp the URL and 'file' to check to see if it is a pdf or not. It is not the thing to do at the far end of a slow connection, but if you've throughput to waste ...
Don't forget that if you have no control over the server, there is no requirement that it tells you anything about the link. I don't know if it is still the case, but MS's IIS used to call everything application/x-octet-string and let the client figure it out.
- doug
|
|---|