Sign in to follow this  
Followers 0
DelStone

InetGet problem with downloading mysql installation file

8 posts in this topic

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?

1 person likes this

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 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

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0