Hi,
$user = _URIEncode("tester@bla.com"); // Only example
$password = _URIEncode("my:password");
; Advanced example - downloading in the background
Local $hDownload = InetGet("ftp://"&$user&":"&$password&"@ftp.strato.de/IMG_0001.JPG", @ScriptDir&"\test.jpg", 1, 1)
Do
Sleep(250)
Until InetGetInfo($hDownload, 2) ; Check if the download is complete.
Local $nBytes = InetGetInfo($hDownload, 0)
InetClose($hDownload) ; Close the handle to release resources.
MsgBox(0, "", "Bytes read: " & $nBytes)
Func _URIEncode($sData)
; Prog@ndy
Local $aData = StringSplit(BinaryToString(StringToBinary($sData,4),1),"")
Local $nChar
$sData=""
For $i = 1 To $aData[0]
;~ ConsoleWrite($aData[$i] & @CRLF)
$nChar = Asc($aData[$i])
Switch $nChar
Case 45, 46, 48-57, 65 To 90, 95, 97 To 122, 126
$sData &= $aData[$i]
Case 32
$sData &= "+"
Case Else
$sData &= "%" & Hex($nChar,2)
EndSwitch
Next
Return $sData
EndFunc
Func _URIDecode($sData)
; Prog@ndy
Local $aData = StringSplit(StringReplace($sData,"+"," ",0,1),"%")
$sData = ""
For $i = 2 To $aData[0]
$aData[1] &= Chr(Dec(StringLeft($aData[$i],2))) & StringTrimLeft($aData[$i],2)
Next
Return BinaryToString(StringToBinary($aData[1],1),4)
EndFunc
Shouldn't InetGet be able to download it? Seems like : and/or @ breaks it even when I escape it.
If I ClipPut the URL it works flawless in IE/Chrome
Greetings Greek
Edit: My bad, I edited the question