I am using Mailhandler to import quite a bit of content. The one piece I'm not able to get is a pdf.

The email body contains five links. The last link goes to a page that has an iframe with a source of the pdf I want. Example:

<iframe src="/files/20394.pdf">

However, the link in the email does not seem to have "20394" anywhere in it, so I can't even generate the link to the pdf myself.

At the end, then, I would have the importer import that link as a file.

Is there any other way to grab that pdf?


I was able to do this using curl to get the source code then preg_match to pull the URL. I haven't actually gotten the pdf, though, because it's using a form to generate the pdf. However, that's a different issue, so this question is answered.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.