Forum Moderators: coopster & phranque

Message Too Old, No Replies

How do I fake clicking "accept" button on jsp page?

         

shimano

8:05 am on Nov 28, 2007 (gmt 0)

10+ Year Member



Hi,

I was trying to read a web page by using "get $url" in PERL, but it checked cookies and redirected to another confirmation page where users were asked to click on "AGREE" button. Is there any way that I can fake clicking on the button and read the page I need?

For example, if I want to read the page:
http://www.example.com/products/indices/stdindex/performance.jsp

and it will redirect to the following link and ask users to click button before proceeding to the content page.
http://www.example.com/about/indexdata_tou.jsp?/products/indices/stdindex/performance.jsp

I've tried UserAgent POST but it didn't work.
Thanks a lot.

[edited by: tedster at 7:37 pm (utc) on Nov. 28, 2007]
[edit reason] switch to example.com [/edit]

Brett_Tabke

4:07 pm on Jan 23, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You are after a "post". I don't think you can do that with the url you are using.

You could try a get, by trying to use a query string in the url that mimics the posted data.

timster

9:15 pm on Jan 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can look into curl if you are on *nix. It's a Unix utility, not Perl, but you should be able to embed it into a Perl script running on Unix/Linux/Mac.

Perllover

10:43 am on Jan 28, 2008 (gmt 0)

10+ Year Member



Hallo shimano,

Have a look at:
[search.cpan.org...]

succes,

phranque

11:57 am on Jan 28, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], Perllover!

nice find...