No announcement yet.

Clarification of wget() documentation please?

  • Filter
  • Time
  • Show
Clear All
new posts

    Clarification of wget() documentation please?

    Hi folks, I'm doing a project with wget(), and the documentation at is a bit vague.
    Returns -1 if fails, returns the server response code: Possible examples 200 = success, 301 = moved, 404 = not found.
    I think this means that it returns -1 if there's an internal VM-type error. In any other case, it returns the HTTP response code; and if the code is not 200, it may indicate some other type of error. Can someone please confirm that that's correct, or if not, tell me how it actually works?

    Thanks --

    Kent Multer
    Magic Metal Productions
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:

    -1 if it can't connect for whatever reason, timeout, invalid HTTPS cert, invalid URL Otherwise the HTTP status code is returned.
    David Carver
    Miva, Inc. | Software Developer