check if pdf...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

check if pdf...

Post by andre_c »

Is there any way to check if a file on the server is a pdf document?
I know how to check the extension, but i wonder if i can do something a little more like exif_imagetype
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I've posted the link to the file format spec for pdf's before, that'll tell you want binary information to look for.
Post Reply