ray306 Posted January 7, 2007 Share Posted January 7, 2007 I am trying to download a zip file via HTTP and it would appear that InetGet() should do the trick. The code is below. Any ideas CODE$result=InetGet ( "https://user:pass@www.brisnet.com/secure-bin/brisclub/brisrep.cgi/ggx0107n.zip?drmggx0107n.zip" ,"C:\Horsedownloads", 0 , 0 ) While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250) Wend MsgBox(1,"result","Result of GetInet: "&$result) of course user and pass are subs for the real username and password. Thanks for any help Ray Link to comment Share on other sites More sharing options...
AzKay Posted January 7, 2007 Share Posted January 7, 2007 0 , 0 ) Should be 1) And, I think in the second parameter, you have to use a filename. not a folder. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
LOULOU Posted January 7, 2007 Share Posted January 7, 2007 (edited) I am trying to download a zip file via HTTP and it would appear that InetGet() should do the trick. The code is below. Any ideas CODE$result=InetGet ( "https://user:pass@www.brisnet.com/secure-bin/brisclub/brisrep.cgi/ggx0107n.zip?drmggx0107n.zip" ,"C:\Horsedownloads", 0 , 0 ) While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(250) Wend MsgBox(1,"result","Result of GetInet: "&$result) of course user and pass are subs for the real username and password. Thanks for any help RayHere is synthax of InetGet InetGet ( "URL" [,"filename" [, reload [, background]]] ) The HTTP URL doesn't support user and password in the URL string. Make a search on yahoo with The terms CURL.EXE Curl does support that anyway to provide a ftp-style interface and thus you can pick a file like: curl https://user:pass@www.brisnet.com/secure-bi...drmggx0107n.zip curl downloading adress : http://www.curl.haxx.se/download.html Edited January 7, 2007 by LOULOU Link to comment Share on other sites More sharing options...
AzKay Posted January 7, 2007 Share Posted January 7, 2007 Here is synthax of InetGet InetGet ( "URL" [,"filename" [, reload [, background]]] ) The HTTP URL doesn't support user and password in the URL string. Make a search on yahoo with The terms CURL.EXE Curl does support that anyway to provide a ftp-style interface and thus you can pick a file like: curl https://user:pass@www.brisnet.com/secure-bi...drmggx0107n.zip curl downloading adress : http://www.curl.haxx.se/download.htmlIt does actually. To use a username and password when connecting simply prefix the servername with "username:password@", e.g. "http://myuser:mypassword@www.somesite.com" # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
ray306 Posted January 7, 2007 Author Share Posted January 7, 2007 Thanks for the replies. I tried changing the parameters as AzKay suggested, still failure. As to not supporting username:pass it would appear from the docs that it does support that option but I just can't get it to work. Is there any way to figure out the source of the failure as the return only provides success/failure. Thanks Ray Link to comment Share on other sites More sharing options...
AzKay Posted January 7, 2007 Share Posted January 7, 2007 Add this on the line after the INetGet(). If @Error Then MsgBox(0, "", @Error) # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
ray306 Posted January 7, 2007 Author Share Posted January 7, 2007 Add this on the line after the INetGet().If @Error Then MsgBox(0, "", @Error)Thanks AzKatI did as you suggestedUpon failure it returns a value of 10I don't see a listing of error codes for this function in the docsAny idea what 10 means?Ray Link to comment Share on other sites More sharing options...
AzKay Posted January 7, 2007 Share Posted January 7, 2007 No idea. Though, someone else might be able to help you. =3. Question, Are you sure the url is right? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
LOULOU Posted January 7, 2007 Share Posted January 7, 2007 Here is synthax of InetGet InetGet ( "URL" [,"filename" [, reload [, background]]] ) The HTTP URL doesn't support user and password in the URL string. Make a search on yahoo with The terms CURL.EXE Curl does support that anyway to provide a ftp-style interface and thus you can pick a file like: curl https://user:pass@www.brisnet.com/secure-bi...drmggx0107n.zip curl downloading adress : http://www.curl.haxx.se/download.htmlThe only way to do what you want is to download curl.exe http://curl.haxx.se/download.html Because an Https protocol doesn't allow an user and a password in the url (see RFC about that) Try with curl.exe and after we see Link to comment Share on other sites More sharing options...
Valik Posted January 7, 2007 Share Posted January 7, 2007 (edited) LOULOU, it works. I've used InetGet() like that for years. Stop saying it doesn't work. It does.Oh, I see, it's https. That does present a difference. An error of 10 means there was a problem reading the file. If LOULOU is correct, I would have expected a lower error, around 7. I don't know what the problem is and I don't know of any public/private https sites to download from to test. Edited January 7, 2007 by Valik 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