Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Form and HTTP redirection (https://www.delphipraxis.net/187859-form-http-redirection.html)

WojTec 9. Jan 2016 13:29

Form and HTTP redirection
 
HTML:

Code:
<form method="POST" action="http://www.livejournal.com/misc/adult_explicit.bml">
<input type='hidden' name="ret" value="http://vrotmnen0gi.livejournal.com/2223166.html" />
<button type='submit' name="adult_check" value="Yes, I am at least 18 years old.">Yes, I am at least 18 years old.</button>
</form>
Delphi (library = Clever Internet Suite):

Delphi-Quellcode:
Request.AddFormField('ret', edtSource.Text);
Http.AllowRedirects := True;
Http.Post('http://www.livejournal.com/misc/adult_explicit.bml', Request, Html);
This code gives me adult_explicit.bml, but should the one from ret fiels. Could you help, please :?:

geskill 11. Jan 2016 20:09

AW: Form and HTTP redirection
 
Just set this cookie and you're fine: adult_explicit=1 for .livejournal.com

You are not required to do the POST-REQUEST.

I think you know what you do :-D

WojTec 12. Jan 2016 14:19

Re: Form and HTTP redirection
 
Thank you buddy!


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz