Announcement

Collapse
No announcement yet.

File Length of web file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jim Seekamp
    replied
    Thanks

    Leave a comment:


  • Paul Franks
    replied
    Originally posted by Jim Seekamp View Post
    Is it possible to get the file length of a file on the web that you are downloading with TCP Open ??
    It's in the header, in the Content-Length attribute. Here's the header and first few lines from www.powerbasic.com:

    Code:
    HTTP/1.1 200 OK
    Connection: keep-alive
    Date: Sat, 19 Apr 2008 16:17:45 GMT
    Server: Microsoft-IIS/6.0
    [b]Content-Length: 62746[/b]
    Content-Type: text/html
    Set-Cookie: ASPSESSIONIDAAAABRCB=PJKJNHJAPIPKGMPLHFJLOMPL; path=/
    Cache-control: private
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
      <title>PowerBASIC: Basic Compilers</title>
      <meta name="keywords"
     content="power basic compiler, powerbasic downloads, BASIC programming, pbdll, turbo basic, qbasic compiler, visual basic, vb">
      <meta name="description"
     content="Welcome to PowerBASIC! Shop online for PowerBASIC compilers, BASIC compilers and programming tools for Windows and DOS.  Extensive tech support and peer support forums available.">
      <meta http-equiv="pics-label"
     content="(pics-1.1 &quot;http://www.icra.org/ratingsv02.html&quot; l gen true for &quot;http://www.powerbasic.com&quot; r (cz 1 lb 1 lc 1 nz 1 oz 1 vz 1) &quot;http://www.rsac.org/ratingsv01.html&quot; l gen true for &quot;http://www.powerbasic.com&quot; r (n 0 s 0 v 0 l 2))">
    
    
      <link rel="stylesheet" href="pb.css">

    Leave a comment:


  • Michael Mattias
    replied
    I don't know you can do it with the intrinsic TCP functions, but I can't think of any reason you could not do an InternetOpenUrl and query the file size independent of those functions.

    (Hell, it's a thought)

    Leave a comment:


  • Jim Seekamp
    started a topic File Length of web file

    File Length of web file

    Is it possible to get the file length of a file on the web that you are downloading with TCP Open ??
Working...
X