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 7939741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:11:47+00:00 2026-06-03T23:11:47+00:00

EDIT : I have found how to post headers, and I know how to

  • 0

EDIT : I have found how to post headers, and I know how to get the value, but need help to do it. Here is it.

  • I have to retrieve the webpage. (this part is ok)
  • Find on which line result “formulaire_action_args” appears and save it in a variable. (looking for a better way than a loop to do it)
  • And retrieve the attribute “value” from this line.

I am trying to get the content of an html page contained in a div like so:

<form id="formulaire_login" method="post" action="/spip.php?page=login&amp;lang=fr" enctype="multipart/form-data">
    <div>
        <input name="page" value="login" type="hidden">
        <input name="lang" value="fr" type="hidden">
        <input name="formulaire_action" type="hidden" value="login">
        <input name="formulaire_action_args" type="hidden" value="random_value">
    </div>
    <fieldset>
        <ul>
            <li class="editer_login obligatoire">
               <input type="text" class="text" name="var_login" id="var_login" value="" size="40">
            </li>
            <li class="editer_password obligatoire">
                <input type="password" class="password" name="password" id="password" value="" size="40">
            </li>
        </ul>
    </fieldset>
</form>

I want to get the content of form with id=”formulaire_login” and inside this form get the value of the attribute “value” (random_value) of the input

<input name="formulaire_action_args" type="hidden" value="random_value">

And on a second hand, I am looking for a way to request a URL with POST header data.

  • 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-06-03T23:11:49+00:00Added an answer on June 3, 2026 at 11:11 pm

    If the full text of your page is in pagetext, you can retrieve that value via a Lua pattern match without needing to loop over anything:

    value = pagetext:match('name="formulaire_action_args"[^>]*value="([^"]+)"')
    
    print(value) --> random_value
    

    The way Lua patterns (regular expressions, essentially) work is (1) most characters match themselves, (2) there are ways of specifying classes of characters to match, (3) there are ways of specifying how many of a specific character/class to match.

    name="formulaire_action_args" --> match this text exactly
    [^>]*                         --> match 0 or more characters that are NOT a > character
    value="                       --> match this text exactly
    ([^"]+)                       --> find 1 or more characters that are NOT a quote character and "capture" it
    

    More on Lua patterns.

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

Sidebar

Related Questions

I have been told to edit this file in Sharepoint Designer: /_layouts/KWizCom_WikiPlus/CreateNew.aspx I found
EDIT: I believe i may have found the problem. I need to work on
EDIT: I have fixed all but two warnings now, so thank you all for
EDIT: I have edited my post... Working on a project (c#), I have a
EDIT i have something like this in a file: imagecolor=0 arrayimagecolorcopy=0 arrayimagecolorcopy3d=0 when i
I have to edit my question just to make it clear. What I need
I have found this little script in PHP that send a simple request to
I am iterating over some elements and I have found that document.getElementById(id) works, but
I have found several questions and answers pertaining to my question, but I'm getting
I have found this popular PHP/MySQL Script called Zip Location by SaniSoft and it

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.