Página 2 de 3 PrimeiroPrimeiro 123 ÚltimoÚltimo
+ Responder ao Tópico



  1. Ai fica mais fácial ainda...

    Veja só...

    Toda consulta ao MK resulta em uma string enorme e com padrão, então vc realiza a consulta aos usuários cadastrados na interface wireless, depois faz a consulta em quem está cadastrado no seu hotspot. feito isso vc cria um objeto para cada resposta. Neste objeto ´vc faz apenas um "De-Para" e aqueles que não estão acadastrados vc cadastra...

    Cara eu to fazendo um programa para controle total do MK, meu sistema irá contemplar pagamento e corte automatico para aqueles que são inadimplentes e desbloqueio quando o cara pagar...
    Mas para isso eu tive que montar os padroes de resposta do MK e estou conseguindo fazer tudo... É só ter um pouco de criativiadade que sai...

    Se tiver alguma dúvida mais específica posta ai, pq um problema seu pode ser o meu algum dia e vice-versa...

    Flw!!!

  2. Citação Postado originalmente por efren Ver Post
    Ai fica mais fácial ainda...

    Veja só...

    Toda consulta ao MK resulta em uma string enorme e com padrão, então vc realiza a consulta aos usuários cadastrados na interface wireless, depois faz a consulta em quem está cadastrado no seu hotspot. feito isso vc cria um objeto para cada resposta. Neste objeto ´vc faz apenas um "De-Para" e aqueles que não estão acadastrados vc cadastra...

    Cara eu to fazendo um programa para controle total do MK, meu sistema irá contemplar pagamento e corte automatico para aqueles que são inadimplentes e desbloqueio quando o cara pagar...
    Mas para isso eu tive que montar os padroes de resposta do MK e estou conseguindo fazer tudo... É só ter um pouco de criativiadade que sai...

    Se tiver alguma dúvida mais específica posta ai, pq um problema seu pode ser o meu algum dia e vice-versa...

    Flw!!!
    Boa sorte,

    to achando sua saida muito complicada.



  3. Axo q entendi mais ou menos oq vc ta precisando ....

    Tbem faço o meu sistema de clientes em ASP (hospedado na net) comunicar com o MK pra guardar algumas infos dos clientes no bd em acess ou mysql...

    $(username) 'login do cliente
    $(link-logout) 'link q foiconfigurado qdo o cliente fazo logout
    $(link-redirect) 'link q o cliente tentou entrar e foi bloqueado pelo hotspot
    $(link-advert) 'link d advertencia configurado no hotspot
    $(link-orig) 'link q o cliente tava qdo foi bloqueado pelo "advert do hotspot"
    $(link-login) 'link do login
    $(error) 'erro ocorreu o login
    $(link-login-only) 'link do login no caso (login.html)
    $(bytes-in-nice) / $(bytes-out-nice) 'qtde da trafego feito por vc até o momento
    $(uptime) 'tempo on-line
    $(elif refresh-timeout) 'tempo de refresh q ta configurado no mk o status.htm.
    $(refresh-timeout) 'ultima vez q fez refresh
    $(mac) 'mac do cliente
    $(ip) 'ip do cliente
    $(identity) 'nome do servidor conectado
    $(hostname) 'ip do servidor

    Se souber de mais alguma POSTA awe por favor, porque parece q qto mais descubro essas 'variaveis' eu arrumo algo pra trata-las...

  4. Agradeço a todos os amigos, e posto o resultado positivo que obtive em minha busca incessante pelo saber:

    Variables
    All of the Servlet HTML pages use variables to show user specific values. Variable names appear only in the HTML source of the servlet pages - they are automatically replaced with the respective values by the HotSpot Servlet. For each variable there is an example of its possible value included in brackets. All the described variables are valid in all servlet pages, but some of them just might be empty at the time they are accesses (for example, there is no uptime before a user has logged in).
    • Common server variables:
      • hostname - DNS name or IP address (if DNS name is not given) of the HotSpot Servlet ("hotspot.example.net")
      • identity - RouterOS identity name ("MikroTik")
      • login-by - authentication method used by user
      • plain-passwd - a "yes/no" representation of whether HTTP-PAP login method is allowed ("no")
      • server-address - HotSpot server address ("10.5.50.1:80")
      • server-name - name of hotspot server
      • ssl-login - a "yes/no" representation of whether HTTPS method was used to access that servlet page ("no")
      • server-name - HotSpot server name (set in the /ip hotspot menu, as the name property)
      • interface-name - physical HotSpot interface name (in case of bridged interfaces, this will return the actual bridge port name)
    • Links:
      • link-login - link to login page including original URL requested ("http://10.5.50.1/login?dst=http://www.example.com/")
      • link-login-plain - link to login page, not including original URL requested ("http://10.5.50.1/login")
      • link-logout - link to logout page ("http://10.5.50.1/logout")
      • link-status - link to status page ("http://10.5.50.1/status")
      • link-orig - original URL requested ("http://www.example.com/")
    • General client information
      • domain - domain name of the user ("mt.lv")
      • interface-name - name of the physical interface, on which client is connected (in case of bridge, it will contain the name of bridge port)
      • ip - IP address of the client ("10.5.50.2")
      • logged-in - "yes" if the user is logged in, otherwise - "no" ("yes")
      • mac - MAC address of the user ("01:23:45:67:89:AB")
      • trial - a "yes/no" representation of whether the user has access to trial time. If users trial time has expired, the value is "no"
      • username - the name of the user ("John")
    • User status information:
      • idle-timeout - idle timeout ("20m" or "" if none)
      • idle-timeout-secs - idle timeout in seconds ("88" or "0" if there is such timeout)
      • limit-bytes-in - byte limit for send ("1000000" or "---" if there is no limit)
      • limit-bytes-out - byte limit for receive ("1000000" or "---" if there is no limit)
      • refresh-timeout - status page refresh timeout ("1m30s" or "" if none)
      • refresh-timeout-secs - status page refresh timeout in seconds ("90s" or "0" if none)
      • session-timeout - session time left for the user ("5h" or "" if none)
      • session-timeout-secs - session time left for the user, in seconds ("3475" or "0" if there is such timeout)
      • session-time-left - session time left for the user ("5h" or "" if none)
      • session-time-left-secs - session time left for the user, in seconds ("3475" or "0" if there is such timeout)
      • uptime - current session uptime ("10h2m33s")
      • uptime-secs - current session uptime in seconds ("125")
    • Traffic counters, which are available only in status page:
      • bytes-in - number of bytes received from the user ("15423")
      • bytes-in-nice - user-friendly form of number of bytes received from the user ("15423")
      • bytes-out - number of bytes sent to the user ("11352")
      • bytes-out-nice - user-friendly form of number of bytes sent to the user ("11352")
      • packets-in - number of packets received from the user ("251")
      • packets-out - number of packets sent to the user ("211")
      • remain-bytes-in - remaining bytes until limit-bytes-in will be reached ("337465" or "---" if there is no limit)
      • remain-bytes-out - remaining bytes until limit-bytes-out will be reached ("124455" or "---" if there is no limit)
    • Miscellaneous variables
      • session-id - value of 'session-id' parameter in the last request
      • var - value of 'var' parameter in the last request
      • error - error message, if something failed ("invalid username or password")
      • error-orig - original error message (without translations retrieved from errors.txt), if something failed ("invalid username or password")
      • chap-id - value of chap ID ("\371")
      • chap-challenge - value of chap challenge ("\357\015\330\013\021\234\145\245\303\253\142\246\133\175\375\316")
      • popup - whether to pop-up checkbox ("true" or "false")
      • advert-pending - whether an advertisement is pending to be displayed ("yes" or "no")
    • RADIUS-related variables
      • radius<id> - show the attribute identified with <id> in text string form (in case RADIUS authentication was used; "" otherwise)
      • radius<id>u - show the attribute identified with <id> in unsigned form (in case RADIUS authentication was used; "0" otherwise)
      • radius<id>-<vnd-id> - show the attribute identified with <id> and vendor ID <vnd-id> in text string form (in case RADIUS authentication was used; "" otherwise)
      • radius<id>-<vnd-id>u - show the attribute identified with <id> and vendor ID <vnd-id> in unsigned form (in case RADIUS authentication was used; "0" otherwise)
    Este material foi retirado do seguinte link: HotSpot Gateway - MikroTik Wireless Router, Shop, Certified Consultants and Training

    Todos os créditos ao autor.



  5. Citação Postado originalmente por orionxe Ver Post
    Agradeço a todos os amigos, e posto o resultado positivo que obtive em minha busca incessante pelo saber:

    Variables
    All of the Servlet HTML pages use variables to show user specific values. Variable names appear only in the HTML source of the servlet pages - they are automatically replaced with the respective values by the HotSpot Servlet. For each variable there is an example of its possible value included in brackets. All the described variables are valid in all servlet pages, but some of them just might be empty at the time they are accesses (for example, there is no uptime before a user has logged in).
    • Common server variables:
      • hostname - DNS name or IP address (if DNS name is not given) of the HotSpot Servlet ("hotspot.example.net")
      • identity - RouterOS identity name ("MikroTik")
      • login-by - authentication method used by user
      • plain-passwd - a "yes/no" representation of whether HTTP-PAP login method is allowed ("no")
      • server-address - HotSpot server address ("10.5.50.1:80")
      • server-name - name of hotspot server
      • ssl-login - a "yes/no" representation of whether HTTPS method was used to access that servlet page ("no")
      • server-name - HotSpot server name (set in the /ip hotspot menu, as the name property)
      • interface-name - physical HotSpot interface name (in case of bridged interfaces, this will return the actual bridge port name)

    • Links:
      • link-login - link to login page including original URL requested ("http://10.5.50.1/login?dst=http://www.example.com/")
      • link-login-plain - link to login page, not including original URL requested ("http://10.5.50.1/login")
      • link-logout - link to logout page ("http://10.5.50.1/logout")
      • link-status - link to status page ("http://10.5.50.1/status")
      • link-orig - original URL requested ("http://www.example.com/")

    • General client information
      • domain - domain name of the user ("mt.lv")
      • interface-name - name of the physical interface, on which client is connected (in case of bridge, it will contain the name of bridge port)
      • ip - IP address of the client ("10.5.50.2")
      • logged-in - "yes" if the user is logged in, otherwise - "no" ("yes")
      • mac - MAC address of the user ("01:23:45:67:89:AB")
      • trial - a "yes/no" representation of whether the user has access to trial time. If users trial time has expired, the value is "no"
      • username - the name of the user ("John")

    • User status information:
      • idle-timeout - idle timeout ("20m" or "" if none)
      • idle-timeout-secs - idle timeout in seconds ("88" or "0" if there is such timeout)
      • limit-bytes-in - byte limit for send ("1000000" or "---" if there is no limit)
      • limit-bytes-out - byte limit for receive ("1000000" or "---" if there is no limit)
      • refresh-timeout - status page refresh timeout ("1m30s" or "" if none)
      • refresh-timeout-secs - status page refresh timeout in seconds ("90s" or "0" if none)
      • session-timeout - session time left for the user ("5h" or "" if none)
      • session-timeout-secs - session time left for the user, in seconds ("3475" or "0" if there is such timeout)
      • session-time-left - session time left for the user ("5h" or "" if none)
      • session-time-left-secs - session time left for the user, in seconds ("3475" or "0" if there is such timeout)
      • uptime - current session uptime ("10h2m33s")
      • uptime-secs - current session uptime in seconds ("125")

    • Traffic counters, which are available only in status page:
      • bytes-in - number of bytes received from the user ("15423")
      • bytes-in-nice - user-friendly form of number of bytes received from the user ("15423")
      • bytes-out - number of bytes sent to the user ("11352")
      • bytes-out-nice - user-friendly form of number of bytes sent to the user ("11352")
      • packets-in - number of packets received from the user ("251")
      • packets-out - number of packets sent to the user ("211")
      • remain-bytes-in - remaining bytes until limit-bytes-in will be reached ("337465" or "---" if there is no limit)
      • remain-bytes-out - remaining bytes until limit-bytes-out will be reached ("124455" or "---" if there is no limit)

    • Miscellaneous variables
      • session-id - value of 'session-id' parameter in the last request
      • var - value of 'var' parameter in the last request
      • error - error message, if something failed ("invalid username or password")
      • error-orig - original error message (without translations retrieved from errors.txt), if something failed ("invalid username or password")
      • chap-id - value of chap ID ("\371")
      • chap-challenge - value of chap challenge ("\357\015\330\013\021\234\145\245\303\253\142\246\133\175\375\316")
      • popup - whether to pop-up checkbox ("true" or "false")
      • advert-pending - whether an advertisement is pending to be displayed ("yes" or "no")

    • RADIUS-related variables
      • radius<id> - show the attribute identified with <id> in text string form (in case RADIUS authentication was used; "" otherwise)
      • radius<id>u - show the attribute identified with <id> in unsigned form (in case RADIUS authentication was used; "0" otherwise)
      • radius<id>-<vnd-id> - show the attribute identified with <id> and vendor ID <vnd-id> in text string form (in case RADIUS authentication was used; "" otherwise)
      • radius<id>-<vnd-id>u - show the attribute identified with <id> and vendor ID <vnd-id> in unsigned form (in case RADIUS authentication was used; "0" otherwise)


    Este material foi retirado do seguinte link: HotSpot Gateway - MikroTik Wireless Router, Shop, Certified Consultants and Training

    Todos os créditos ao autor.

    Essas são as variáveis do sistema hotspot, excluisivamente, e funcionam na personalização da pagina, observando que a maioria é apenas read, não permitindo montar sistema do tipo central do cliente.






Tópicos Similares

  1. Respostas: 2
    Último Post: 21-11-2014, 06:22
  2. Respostas: 8
    Último Post: 09-10-2012, 09:05
  3. Respostas: 13
    Último Post: 22-03-2012, 13:43
  4. Respostas: 0
    Último Post: 29-10-2011, 16:21
  5. Respostas: 5
    Último Post: 31-08-2011, 09:10

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L