[VB6] File size checking of many online files

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Shenk

Thread Starter
Joined
Oct 9, 2008
Messages
2
I'm trying to write a program that detects file sizes of online images..

So far I've tried to use FileLen to achive this and found out:
1.) It doesn't seem to be possible to get it to work with online files

2.) It doesn't seem to work if you set it to look at an imported image
(eg: Image1.Picture = LoadPicture("C:\Test.jpg")
Text1.Text = FileLen.Image1)

And i'd rather not download the files or use Winsocks unless i REALLY have to,
I am trying to run it to check over 10,000 images so downloading is not really a great option for me :(

Any help?
[ I do know it'd be easier to write in other programs but i'm quite far into this one! and i don't know any other languages =( ]
 
Joined
Jun 8, 2001
Messages
2,583
I'm not sure this is possible, maybe some will tell us? Seems like you're wanting to see file system properties on systems you won't have access to. An html tag on a web page won't have the info your looking for.
 

Shenk

Thread Starter
Joined
Oct 9, 2008
Messages
2
But if I go into a site and Right-click on a picture it will have a properties menu that includes file size?...

UNLESS it's recieving that data from your temp files? Ooo! Maybe I can do it that way!

If anyone has a better way of doing this please do feel free to leave a message here, if not - i'll try and figure out how to do it using my Temp files ;)
 
Joined
Feb 17, 2008
Messages
490
I think temp files is the only way of doing this because your browser has already downloaded the pictures, that's how it calculates the size. Using LOF would probably be faster:

open "path" for input as #1
x=LOF(1)
close #1
 
Joined
Sep 9, 2006
Messages
60
What about wininet? MS has a VB 6 sample that you can modify to make head requests on the image uri. Here's is a class wrapper for wininet that is really easy to use for get and post requests, but I'm *sure* it would work with head requests too.

As I recall, the head request will give you the size of the resource without having to download it directly.

HTH
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top