Skip to main content

13 Messages

 • 

228 Points

Tue, May 22, 2018 4:39 PM

Virtual SmartZone html login form example

Does someone has a captive portal login form with POST action and required hidden fields example to use with VirtualSmartZone?

Thanks!

Responses

16 Messages

 • 

310 Points

3 years ago

Hi Cristiano,

May be you can you try this below . Replace x.x.x.x with the ZD IP address.

 
Wireless Internet Service 
 

Wireless Internet Service

 
" rel="nofollow" target="_blank" title="Link http//172181102319997/login">http://x.x.x.x:9997/login">; 
 
 
 
 
Username:
Password:
 
 
 

Regards,
Vivek Gupta

13 Messages

 • 

228 Points

Thanks! I'm going to use this with Zone Director.

388 Messages

 • 

5.9K Points

3 years ago

Hi.

If you use above code, you'll meet failure to authentication because SZ an ZD have different form code.


----------------------------------------------



Wireless Internet Service

function get_param(name)
{
    if (location.href.indexOf("?") >= 0) 
    { 
        var query=location.href.split("?")[1];
        var params=query.split("&");
        for (var i = 0; i < params.length; i ++) {
             value_pair=params[i].split("=");
            if (value_pair[0] == name)
                 return unescape(value_pair[1]);
        }
    }
    return "";
}
function get_sip() {
    var sip = get_param("sip");
   //var sip = "172.21.144.65"; -----> if you need to static ip, write the ip here


    if (sip.indexOf(":") < 0) { // IPv4 address
        return sip;
    } else {                    // IPv6 address
        return '[' + sip + ']';
    }
}






Wireless Internet Service for SmartZone



document.write('
http://' + get_sip() + ':9997/SubscriberPortal/hotspotlogin">');
document.write('');
document.write('');
document.write('');
document.write('');


Username:
Password:







----------------------------------------------

Above code will be parsing to controller ip automatically.

Regards.

13 Messages

 • 

228 Points

Thanks! This is the correct example for Virtual SmartZone. Worked ok!

2 Messages

 • 

80 Points

How do you get the get_param("uip") and get_param("client_mac")?

3 Messages

 • 

100 Points

a year ago