• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How do I display a users IP address on the captive portal login page??

Off-Topic & Non-Support Discussion
3
6
3.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    craibo
    last edited by May 18, 2007, 12:37 PM May 18, 2007, 12:34 PM

    I'm looking for some code to display a users IP address on the captive portal login page.

    all the users have static IP address assigned to them according to there MAC address by the DHCP. i want them to be able to see there IP address on the captive portal login page so that wen they visit the bandwidthd link on the page they know which IP to look at.

    i have tried quite a few code bits but nothing seems to work.

    Thanks alot guys

    by the way pfsense runs extremely well. i'm very impressed!

    1 Reply Last reply Reply Quote 0
    • B
      Borage
      last edited by May 18, 2007, 8:22 PM

      I think the login page only supports basic html.

      1 Reply Last reply Reply Quote 0
      • C
        craibo
        last edited by May 20, 2007, 7:49 AM

        Is there not a way to use another page which you can load in to the captive portal file manager and use a .php from there. i believe it can use php??

        1 Reply Last reply Reply Quote 0
        • B
          Borage
          last edited by May 20, 2007, 2:24 PM

          You could use a code like this if the login page supports php, but it does not seem to support anything else than basic html.

          echo 'User IP Address: ' .$_SERVER['REMOTE_ADDR']. '';
          ?> 
          
          1 Reply Last reply Reply Quote 0
          • C
            craibo
            last edited by May 21, 2007, 5:15 PM

            @Borage:

            You could use a code like this if the login page supports php, but it does not seem to support anything else than basic html.

            echo 'User IP Address: ' .$_SERVER['REMOTE_ADDR']. '';
            ?> 
            

            The logon page only does basic html but in the captive portal file manager it says somthing about executing php files. the code above doesn't work on the logon page. but it is the right code

            1 Reply Last reply Reply Quote 0
            • S
              sullrich
              last edited by May 21, 2007, 5:27 PM

              The default page does not do php.  You need to use a html meta redirect or javascript to redirect to a custom uploaded page that has been added from the file manager.

              1 Reply Last reply Reply Quote 0
              5 out of 6
              • First post
                5/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.