MrSpacely Posted September 5, 2005 Share Posted September 5, 2005 Hey I was using inetget as part of a automatic pc naming tool wich downloads the name list (with mac adres and pc name) from a http server because using microsoft network was slower and sucked with password issues. But It downloads it and returns 1 thats nice, but f the file does not excist it still downloads the 404 error page and also returns 1. The help file says: Return Value Success: Returns 1. Failure: Returns 0. I my idea a 404 is failure not success does anyone know how to detect the 404 error except by reading the file and looking for 404. Because the server also sends a 404 returncode before sending the file wich is always and error. it should only save the file when there is a 200 return code (and maybe be able to force download if you want to read the error pages) If anyone got a simple solution for this (not reading the file and looking for 404) But something like maybe a extra return code I forgot about? Link to comment Share on other sites More sharing options...
ning Posted September 5, 2005 Share Posted September 5, 2005 No - trying this out, it looks like parsing the file is the only way to detect a 404. There's no error code set in @extended. Link to comment Share on other sites More sharing options...
w0uter Posted September 5, 2005 Share Posted September 5, 2005 (edited) try using _InetGetSource() see the new version is my sig. Edited September 5, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
MrSpacely Posted September 5, 2005 Author Share Posted September 5, 2005 try using _InetGetSource() see the new version is my sig.<{POST_SNAPBACK}>can it handle binary files? need to Link to comment Share on other sites More sharing options...
w0uter Posted September 5, 2005 Share Posted September 5, 2005 at first i thought you just ment plain text name list (with mac adres and pc name)for the binary:kinda, depends on what you mean by handle.it can download em and you would have the ascii representative (sp?)i havent tested it with the _API* commands larry made.in theory it should be possible though but seeing INetGet modified would ofcourse be better My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
MrSpacely Posted September 8, 2005 Author Share Posted September 8, 2005 at first i thought you just ment plain text for the binary:kinda, depends on what you mean by handle.it can download em and you would have the ascii representative (sp?)i havent tested it with the _API* commands larry made.in theory it should be possible though but seeing INetGet modified would ofcourse be better <{POST_SNAPBACK}>Well it downloads a textfile indeed but also downloads a program wich can be updated if needed (if domain password needs to change the domain changing program needs to change also). And that program is binary. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now