File statistics from web page files

J

jbl

I want to be able to get file statistics from a "friendly" server.
Currently from the browser I see a list of .pdf files.

http://welcome.brochurearchive.com/pdfs not actual

eg;
Directory handle: Resource id #2 Files: .
...
XiGh_II-p4302-c3837-UK-1.pdf
XiGh_II-p4302-c3837-NO-1.pdf
XiGh_II-p4302-c3837-SE-1.pdf
XiGh_II-p4302-c3837-DK-1.pdf

Is there a perl way to get the creation/modification date of the pdf
files without having to download the entire page?

Not asking for someone to code it but just a general idea of how to

Thanks
jbl
 
J

Jim Keenan

jbl said:
I want to be able to get file statistics from a "friendly" server.
Currently from the browser I see a list of .pdf files.

http://welcome.brochurearchive.com/pdfs not actual


Is there a perl way to get the creation/modification date of the pdf
files without having to download the entire page?

perldoc -f stat

But this assumes you have appropriate permissions to read file/directory
information on the server.

Jim Keenan
 
J

Joe Smith

jbl said:
I want to be able to get file statistics from a "friendly" server.
Currently from the browser I see a list of .pdf files.

http://welcome.brochurearchive.com/pdfs not actual

eg;
Directory handle: Resource id #2 Files: .
..
XiGh_II-p4302-c3837-UK-1.pdf
XiGh_II-p4302-c3837-NO-1.pdf
XiGh_II-p4302-c3837-SE-1.pdf
XiGh_II-p4302-c3837-DK-1.pdf

Is there a perl way to get the creation/modification date of the pdf
files without having to download the entire page?

Yes, use HEAD instead of GET.

perldoc LWP::Simple

head($url)
Get document headers. Returns the following 5 values if
successful: ($content_type, $document_length, $modified_time,
$expires, $server)

-Joe
 
J

jbl

Yes, use HEAD instead of GET.

perldoc LWP::Simple

head($url)
Get document headers. Returns the following 5 values if
successful: ($content_type, $document_length, $modified_time,
$expires, $server)

-Joe

Thanks
head($url) got it done

jbl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top