
12.04.2010, 23:07
|
|
Познающий
Регистрация: 07.06.2009
Сообщений: 30
С нами:
8909709
Репутация:
0
|
|
Вот что пришло на GET запрос:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 WebMoney Advisor
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: ru,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://terabit.ru/free.php
Cookie: PHPSESSID=800fsde3g5jie4njrp6be4rs30
If-Modified-Since: Sat, 05 Sep 2009 13:42:34 GMT
If-None-Match: "1f029b-318d-c9f8c680"
Cache-Control: max-age=0
HTTP/1.x 304 Not Modified
Date: Sun, 11 Apr 2010 15:40:07 GMT
Server: Apache/2.2.3 (Red Hat)
Connection: close
Etag: "1f029b-318d-c9f8c680"
Вот что отправилось на POST:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 WebMoney Advisor
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ru,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://terabit.ru/free.php
Cookie: PHPSESSID=800fsde3g5jie4njrp6be4rs30
Content-Type: application/x-www-form-urlencoded
Content-Length: 45
email=QAZ1aAA1WsX%40YahOo.com&keystring=8k4hd
HTTP/1.x 200 OK
Date: Sun, 11 Apr 2010 15:40:15 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.2.10
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 6886
Connection: close
Content-Type: text/html; charset=windows-1251
Вот что я пытаюсь отправить через дельфи:
procedure TForm1.Button1Click(Sender: TObject);
var
PageText: TStringList;
PostData: TStringList;
Http: TidHttp;
CM: TidCookieManager;
email, keystring: String;
begin
{Создаем объекты в памяти}
Http:=TIdHTTP.Create(Self);
PostData:=TStringList.Create;
CM:=TidCookieManager.Create(Http);
{Задаем нужные параметры}
HTTP.Request.UserAgent:='Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 WebMoney Advisor';
HTTP.Request.Accept:='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
HTTP.Request.AcceptLanguage:='ru,en-us;q=0.7,en;q=0.3';
HTTP.Request.AcceptEncoding:='gzip,deflate';
HTTP.Request.AcceptCharset:='windows-1251,utf-8;q=0.7,*;q=0.7';
HTTP.Request.Connection:='keep-alive';
HTTP.Request.Referer:='http://terabit.ru/free.php';
//А вот тут у меня судя по всему что то неправильно написано или все правильно?
HTTP.Request.Cookie:='PHPSESSID=800fsde3g5jie4njrp 6be4rs30'; //тут ID будет менятся
HTTP.Request.Content-Type:='application/x-www-form-urlencoded';
HTTP.CookieManager:=CM;
HTTP.AllowCookies:=True;
HTTP.HandleRedirects:=True;
А вот отправка запроса у меня правильная?
{2. Формируем запрос}
email:=edit1.text;
keystring:=edit2.text;
url:=edit6.text;
PostData.Add('email&keystring');
PageText.Text:=HTTP.Post('url', PostData);
Последний раз редактировалось Ss[x]dD; 12.04.2010 в 23:27..
|
|
|
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|