GetUrlScript.txt 1.1 KiB

pirms 4 gadiem
1234567891011121314151617181920212223242526272829
  1. var
  2. r:integer;
  3. BaseUrl: string;
  4. begin
  5. if version = '' then
  6. r := random(2)
  7. else
  8. r := StrToInt(version);
  9. case r of
  10. 0: BaseUrl := GetURLBase;
  11. 1: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'gmap.camapka.ru/lotsia/', '91.237.82.95:8088/pub/water/camapka.ru/');
  12. end;
  13. case r of
  14. 0: ResultURL := BaseUrl+'Z'+inttostr(getz-1)+'/'+inttostr(gety)+'/'+inttostr(getx)+'.png';
  15. 1: ResultURL := BaseUrl+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png';
  16. end;
  17. RequestHead :=
  18. 'Accept: image/png, image/svg+xml, image/*;q=0.8, */*;q=0.5' + #13#10 +
  19. 'Referer: http://camapka.ru/mapview/lotsia.htm' + #13#10 +
  20. 'Accept-Language: ru-RU' + #13#10 +
  21. 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko' + #13#10 +
  22. 'Accept-Encoding: gzip, deflate' + #13#10 +
  23. 'Connection: Keep-Alive' + #13#10 +
  24. 'DNT: 1' + #13#10 +
  25. 'Host: gmap.camapka.ru';
  26. end.