30-05-2018, Saat: 22:42
(30-05-2018, Saat: 22:04)Paranoyaq Adlı Kullanıcıdan Alıntı:function DoLogin(const username,email,url,comment: string): string; var IdHTTP: TIdHTTP; Request: TStringList; begin try Request := TStringList.Create; try Request.Add('action=do_login'); Request.Add('url=https://www.oyunkabini.com/battlefield-v-ilk-fragmanini-yayinladi-ve-daha-fazlasi-dlc-premium-passes/'); Request.Add('submit=727'); Request.Add('author'+username); Request.Add('email='+email); Request.Add('url='+url); Request.Add('comment='+comment); Request.Add('submit'); IdHTTP := TIdHTTP.Create; try IdHTTP.AllowCookies := True; IdHTTP.HandleRedirects := True; IdHTTP.Request.ContentType := 'application/x-www-form-urlencoded'; IdHTTP.Post('https://www.oyunkabini.com/wp-comments-post.php', Request); Result := IdHTTP.Get('http://www.oyunkabini.com'); if StrUtils.ContainsStr(Result, 'submit') then //Login başarısız demektir Result := ''; finally IdHTTP.Free; end; finally Request.Free; end; except Result := ''; end; end;
Kodlarında yanlışlarım nelerdir ?
Merhaba,
Request.Add('author'+username); satırı, Request.Add('author='+username); şeklinde mi olmalı? Her parametre adından sonra = işareti var. Yalnızca bu satırda yok.
Önemli: except ifadesi olduğu sürece hatayı yakalamanız çok zor.
DelphiCan'dır!

