Jump to content

Passing Credentials in a Form and Perform Action


TripleDES

Recommended Posts

All, I want to create a script that performs the following:

 

1. Access a page and submits authentication credentials (www.example.com/login.html)

2. Once authenticated, grab values of a form (www.example.com/logs.html)

 

I just need to be stepped through the thought process.  Unfortunately, I can't use cURL because the main page doesn't request for authentication.  Instead, it's an authentication form/page.  Or perhaps I can still use cURL, but not use its auth mechanism of CURLOPT_USERPWD.

 

Here's the form parameters that must be submitted:

 

	<label>Username:</label>
<input type="text" size="14" name="username" value="User" />
<label>Password:</label>
<input type="password" size="14" name="password" value="" />
<input type="submit" value="Login" />

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.