Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grab PDF from a web site 1

Status
Not open for further replies.

LyndonOHRC

Programmer
Sep 8, 2005
603
0
0
US
thread232-1403324
I need to download several thousand documents and am trying to write a utility to do the job. The site that has the documents only offers http access. FTP not allowed. Anyway, we need to permanently archive these documents as the site is only obligated to publish these links until the case is closed. Obviously using the save-as dialog is really out of the question. BTW, the files are public record.

I'm trying to use the solution in the above thread to grab a PDF and will loop through the file set once I get this to work.

The template executes without error but the file that is written is not the correct size (should be 204kb but is 4kb on my server) and cannot be read by the PDF client.

I'm unsure what to try next or if this is possible; any help appreciated.
Code:
<cfhttp  url="[URL unfurl="true"]http://www.kccllc.net/documents/0910720/0910720101021000000000001.pdf"[/URL] getasbinary="yes" method="GET">
</cfhttp>
<cffile action = "write"    file = "E:\WebPages\binkley\Admin\0910720101021000000000001.pdf"   output = "#cfhttp.filecontent#">

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
cfSearching you are the best! I can't believe I missed that.

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top