Authentication - submitForm() madl Function
On occasions when you are retrieving a page source into an Interaction you may require authorisation from a login form. This is often known as a "PassThru"...
To get around this issue you can use the "submitForm()" function in mADL. The mADL SubmitForm function can be used to:
- Fetch the form at the requested url.
- Submit the required parameters using a string containing the form name or a numeric value representing the form (0 can be used instead to select the first form found, 1 then next and so on.)
- Pass the array of values to the login form.
- Return the results of the fetch for additional formatting.
Here's an example:
$t->fetch("http://mywebsite.com/login.php");