Forum Moderators: coopster

Message Too Old, No Replies

PHP check pdf download help

         

andrewsmd

9:19 pm on Dec 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This one is going to be a doozy. There is a website that we are constantly checking our forms against to see if they are up to date. What I mean is we have all of these pdfs, and we have to go to this site and download each form and compare it against our own to see if they are the same or if this website has a newer version. What I want to do is somehow set up a php script to check all of that for me and generate an email to let me know when something is different. Here is a general way in which I was thinking about it.

Have all of the forms downloaded in some folder.

Everyday check a certain number of the forms but not all of them.

Let's say today we check A-F.

Go to this site <snip>

Download all of the forms A-F.

Check all of the forms against the forms we have downloaded.

I have thought about either checking the file size or seeing if I can get the date modified from the website but I don't really know how. Any other good ideas. Is there anyway to check the contents of a pdf with PHP. Or possibly check the actual binary code? I really don't know where to begin on this one so any suggestions are welcome. Alright people, it's time to see how smart you really are. Thanks,

[edited by: dreamcatcher at 11:03 pm (utc) on Dec. 5, 2008]
[edit reason] No personal urls, thanks. [/edit]

eelixduppy

1:44 am on Dec 9, 2008 (gmt 0)



I'm assuming all of these files do not have any sort of naming convention that would allow you to distringuish ones that you don't already have?

andrewsmd

1:16 pm on Dec 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, I actually got it. I grabbed all of the HTML with curl and then sorted the string and picked out the links based on certain search text. I then used curl to download all of them and just run a check for the file when I download it. Thanks,