function TSpamThread.API_photos_getPhotos: string;
var UA:String;
begin
if userAlbums.Count>0 then UA:=userAlbums[random(useralbums.Count)];
poststr:='gid='+api_gid+'&aid='+UA+'&fields=group_photo.*&count=50&application_key=CAFJIICABBABABA&format=json
&session_key='+sessionkey;
md5str:=sortmd5(poststr)+seskey;
md5str:=md5(md5str);
try
response.Text:=idhttp.Get('api.odnoklassniki.ru/api/photos/getPhotos?'+poststr+'&sig='+md5str);
except exit; end;
albumPhotos.Text:=pasrsegroup('"id":"','"',response.Text);
if albumPhotos.Count>0 then result:=albumPhotos[random(albumPhotos.Count)]
else result:='Photos'+inttostr(userAlbums.Count);
end;