cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: PDF links

From: Richard Lynch <ceo_at_l-i-e.com>
Date: Thu, 3 Jan 2008 16:03:53 -0600 (CST)

On Thu, January 3, 2008 1:24 pm, Ralph Seward wrote:
> I am currently developing a web bot using php/curl and I have a
> question to throw out. Many times I will come across a link to a pdf
> file that appears just like a link to a web page. For example,
> http://www.somesite/healthcenter/ImmunizationForm.pdf. Click on this
> link, and in Firefox a popup-like window will appear asking "What
> should Firefox do with this file?" with the options of Open or Save to
> Disk.
> Now, is it possible to follow such a link through curl and have the
> pdf file saved to disk? Has anyone ever succeeded in doing anything
> with a pdf through curl?

You can get it just as you would with an HTML document.

There's nothing particularly fancy involved.

If you want to actually analyze what's IN the PDF, then things get a
bit more complicated, as the PDF format itself has a bewildering array
of ways in which it can obfuscate content...

But there are projects/products "out there" for tearing apart a PDF
into its parts and analyzing them to varying degrees.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-01-04