My knowledge of Visual Basic is insufficient to allow me to give you
the answer you requested, but I can give you some tips which may help
you (or someone else) look in the right direction.
All you need to do is open a TCP/IP connection to your target
webserver and then use the HTTP "HEAD" request to determine whether or
not your required file exists. The format of the HEAD command (and the
rest of HTTP/1.1) is fully covered by RFC 2616 but in essence all you
will need to send to the server is the following three lines:
HEAD /path/to/target/file.jpg HTTP/1.1
Host: www.webservername.com
Connection: Close
(followed by two CR/LF pairs)
You then need to capture the output from the server which will likely
consist of between 5-10 lines of text. If the requested file is
accessible the server should return a 'HTTP/1.1 200 OK' response as
its first line, if not you will most probably get 'HTTP/1.1 404'
(although if it exists but is not available for other reasons, other
statuses could occur. Consult the HTTP documentation for full
details).
Most computer languages make it fairly easy to use TCP/IP sockets,
often with library files or modules which can make it almost as simple
as writing to a local file. A quick Google search:
://www.google.co.uk/search?q=visual+basic+tcp/ip+socket+open
has revealed, amongst many others, the site
http://www.15seconds.com/issue/990408.htm
which should give you some tips and source code examples that will
help you continue your software development.
Regards
iaint-ga
HTTP 1.1 Specification:
http://www.ietf.org/rfc/rfc2616.txt |