function isInString(const ch: Char; const s: String): Boolean; var i: Integer; begin Result := False; for i := 1 to Length(s) do begin Result := s[i] = ch; if Result then Break; end; end; function URLEncode(const ASrc: String): String; var i: Integer; SafeChars: String; begin Result := ''; SafeChars := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; for i := 1 to Length(ASrc) do begin if not isInString( ASrc[i], SafeChars ) then begin Result := Result + '%' + IntToHex(Ord(ASrc[i]), 2); end else begin Result := Result + ASrc[i]; end; end; end; var v: string; e: string; begin v := 'kd3/sd+asi adf'; e := URLEncode(v); writeln(e); ResultURL := 'http://' + Chr(Ord('a') + Random(3)) + '.tile.openstreetmap.org/' + IntToStr(GetZ-1) + '/' + IntToStr(GetX) + '/' + IntToStr(GetY) + '.png'; RequestHead := 'User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0' + #13#10 + 'Referer: https://www.openstreetmap.org/' + #13#10 + 'Cookie: ' + e + #13#10 + 'Accept: image/webp,*/*'; end.