Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 310825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:52:08+00:00 2026-05-12T07:52:08+00:00

I have to login to a page using three parameters, after that I have

  • 0

I have to login to a page using three parameters, after that I have to POST two parameters to another page inside the site I’ve just logged in.

So far I’ve got a cookie with this:

curl -c cookie.txt -d "username=username&pwd=pwd&domain=mydomain" http://myurl

…inside of the cookie I have a JSESSION id.
I use the cookie as follows:

curl -b cookie.txt -d "par=value" http://myurlnumbertwo

Problems:

  • even after a POST to the login url I get in the console the HTML code of the login page, does this mean that the login did not succeed? How can I find the error that caused this, maybe a log?
  • after a successful login how do I remain in the login session and POST my parameters to the other page?

EDIT:

I finally got this working after stran’s hint, follows the code.

  • POST_DATA contains the exact encoded string that was posted, as in ‘parameter1=value1&parameter2=value2’
  • ACTION_URL contains the full URL to which the form is posted, as in https://stackoverflow.com/users/login

First I did a

wget --save-cookie cookie.txt --post-data 'POST_DATA' ACTION_URL

to make the login and save the cookie, followed by a:

wget --load-cookie cookie.txt --post-data 'POST_DATA' ACTION_URL

to make the POST I needed, thank you again for the hint ^^

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:52:08+00:00Added an answer on May 12, 2026 at 7:52 am

    I’d give wget a try. There is a --save-cookies and --load-cookies option that allows you to use a cookie file. There’s also a facility for handling session cookies, --keep-session-cookies. Refer to the wget man page for more 🙂

    Personally, I’ve had much better luck with post through wget.

    GL!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ASP.NET MVC 2 and have a login page that is secured via
Normally we have login page with username, password filed and signin button. Using the
I have created a user login page and am using Forms Authentication. Users are
I have to login into a https web page and download a file using
I have a login page that has several textboxes on the page, one of
I have a problem on my site's login page in IE7 browser. One of
I'm creating a login page. I want to create ASP.NET TextBox controls that have
We are using the @login_required decorator so that users see a login page if
I have an RP for which I've built a login page using the Json
I have a login page at the beginning of my app that I do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.