Показать сообщение отдельно
  #2  
Старый 16.09.2012, 09:32
scroyler scroyler вне форума
Активный
 
Регистрация: 01.08.2011
Адрес: ЧЕбоксары
Сообщения: 248
Версия Delphi: XE
Репутация: -615
По умолчанию

Код:
procedure TForm1.Button1Click(Sender: TObject);
var
  Data:TStringList;
  Request:String;
  id1,id2,str:string;
  n:integer;
begin
  Data:=TStringList.Create;

str:=idhttp1.Get('http://postingroom.ru/forum/42-0-0-1-1');
n:=pos('"ssid" value="',str)+length('"ssid" value="');
id1:= copy(str,n,posex('" />',str,n)-n);

n:=pos('<button id="askform-button" class="button-yellow-small" style="width: 134px;" onclick="Responses.ask('+'konstantin_delphi'+',',str)+length('<button id="askform-button" class="button-yellow-small" style="width: 134px;" onclick="Responses.ask('+'konstantin_delphi'+',');
id1:= copy(str,n,posex(''+''');">Спросить</button>',str,n)-n);

n:=pos('<div id="textarea-ios-fix"></div><input type="hidden" name="asking_hash" value="',str)+length('<div id="textarea-ios-fix"></div><input type="hidden" name="asking_hash" value="');
id2:= copy(str,n,posex('" id="asking_hash" />',str,n)-n);

   data.Add('username=konstantin_delphi');
   data.Add('question=texxt');
   Data.Add(id1+'='+id2);
   data.Add('anonimous'+'='+'undefined') ;
   data.Add('capctha'+'='+'')  ;
   idhttp1.Post('http://sprashivai.ru/questions/ask',Data);
end;
end.

делаю так,все равно не работает
Подскажите пож.,мне срочно надо!
__________________
Ставь спасибо за спасибо!
Помог?Ставь спасибо!Увидел пост? Поставь спасибо!
Ответить с цитированием