DelStone Posted March 24, 2012 Share Posted March 24, 2012 Hi all I've tried to download the mysql installation file using $file_to_get = "http://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-5.5.21.0.msi/from/http://mirrors.dedipower.com/www.mysql.com/" InetGet($file_to_get, $file_to_save,1 ,0) However it refuses to dowload - any thoughts why? NiVZ 1 Link to comment Share on other sites More sharing options...
qsek Posted March 25, 2012 Share Posted March 25, 2012 i suggest you learn how to debug code. Start with reading the console output in scite, i assume that an error is showed there and also why the error happened. Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite Link to comment Share on other sites More sharing options...
Andreik Posted March 25, 2012 Share Posted March 25, 2012 (edited) $sURL = "http://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-5.5.21.0.msi/from/http://mirrors.dedipower.com/www.mysql.com/" $iSize = InetGetSize($sURL) $hInet = InetGet($sURL,@ScriptDir & "mysql-installer-5.5.21.0.msi",1,1) ProgressOn("Download","mysql-installer-5.5.21.0.msi") $Init = TimerInit() Do $Read = InetGetInfo($hInet,0) ProgressSet($Read*100/$iSize,"Download: " & Round($Read/1024,2) & " kb" & @CRLF & _ "Average speed: " & Round(($Read/1024)/(TimerDiff($Init)/1000),2) & " kb/s") Sleep(1000) Until InetGetInfo($hInet,2) ProgressOff() InetClose($hInet) Edited March 25, 2012 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
DelStone Posted March 25, 2012 Author Share Posted March 25, 2012 qsek - there is no error reported - it runs fine, returns 0 as the filesize and does not download anything andreik - your code too does not download any file. If I enter the url into a broswer it downloads the install file - if I use inetget it does not download anything... Link to comment Share on other sites More sharing options...
Andreik Posted March 25, 2012 Share Posted March 25, 2012 (edited) You must jokes, I tried the code before share it. I think is some problem with your system but the code is correct, I tried again and is still working fine. Use @error to see if you get any error. Edited March 25, 2012 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
qsek Posted March 25, 2012 Share Posted March 25, 2012 (edited) You provided this code:$file_to_get = "http://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-5.5.21.0.msi/from/http://mirrors.dedipower.com/www.mysql.com/" InetGet($file_to_get, $file_to_save,1 ,0)which obviously uses $file_to_save without being declared.So if you dont use another code as above you will get an error.However if i use a proper string as filename the code runs fine and the file is downloaded.If it doesnt work for you, it could be either your firewall blocking connection or folder privileges that prevent the file from being created. Edited March 25, 2012 by qsek Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite Link to comment Share on other sites More sharing options...
DelStone Posted March 25, 2012 Author Share Posted March 25, 2012 Hi Andreik Thanks for your update - I've looked at @error and it contains 0 - I've run the above code on two machines, XP and Windows 7 and same result on both... I'm not sure why you get it to work and it does not download anything for me... Link to comment Share on other sites More sharing options...
DelStone Posted March 25, 2012 Author Share Posted March 25, 2012 I don't believe it - it's just started to work! I've not done anything to the code which I tried before which wasn't working - freaky! But thanks guys - much appreciated... 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