Collect email from captive portal.



  • Hi,

    Actually use captive portal with authentication hidden (user: guest pass: mypass) to allow client enter from wifi.
    I will use default captive portal page to insert an email from users (and a checkbox to allow conset to use this mail).

    It is possible?

    Thanks in advance.



  • @sap68:

    It is possible?

    pfSense is equipped with a build-in simple basic portal 'html' script.

    The idea is that you write your own script, and you could even add PHP scripts if needed.

    I guess, the word "possible" isn't what the one you should use here. You actually SHOULD do it.

    The real question is : CAN you do it ?



  • @Gertjan:

    @sap68:

    It is possible?

    pfSense is equipped with a build-in simple basic portal 'html' script.

    The idea is that you write your own script, and you could even add PHP scripts if needed.

    I guess, the word "possible" isn't what the one you should use here. You actually SHOULD do it.

    The real question is : CAN you do it ?

    I have som basic knowledge of HTML, my problem is:

    I have a form with authentication, How can use mail in the form if the primary action is PORTAL_ACTION?
    In other words: how can I capture mail text input form and use it with this form?
    I really don't know if it is possible.

    My form:

    <form method="post" action="$PORTAL_ACTION$">

    Click here to enter!

    mail:

    </form>



  • Hummm.

    Some solid PHP knowledge is needed.

    As you already might know, pfSense can send mails when some events happen.

    The good news : you have the code that can send mails ! (because you have pfSense).

    Glue it up together and your done.



  • This is something I had to look at for a customer last year, in the end I ended up using my website, and using a cURL command in PHP to log e-mail address into a MySQL database.


Log in to reply