Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help #67

Closed
ntnetx opened this issue Apr 6, 2023 · 2 comments
Closed

help #67

ntnetx opened this issue Apr 6, 2023 · 2 comments

Comments

@ntnetx
Copy link

ntnetx commented Apr 6, 2023

English
hello!! Could you ask a question how would you do these 2 executions PHP to use the api tool to execute this command below?

/tool sniffer packet print where protocol=tcp

/tool sniffer packet print where protocol=udp

Portugues

olá!! poderia tirar uma dúvida como faria essas 2 execução PHP para usar a ferramenta da api para executar esse comando abaixo?

/tool sniffer packet print where protocol=tcp

/tool sniffer packet print where protocol=udp

@ve3
Copy link

ve3 commented Jul 4, 2023

Please see this issue, I hope that will work for you.

Edit: ------------
I'll copy the answer in the link to be here to prevent issue deleted. Below is copied from the link above.

If you would like to use command where with or, like this one in terminal.

/ip dhcp-server lease print where address=192.168.1.11 or address=192.168.1.12 or address=192.168.1.13

Here is sample code.

$API->write('/ip/dhcp-server/lease/print', false);
$API->write('?address=192.168.1.11', false);
$API->write('?address=192.168.1.12', false);
$API->write('?#|', false);
$API->write('?address=192.168.1.13', false);
$API->write('?#|');
$result = $API->read();
// use `$result` variable.

See reference from manual here, and here.

@BenMenking
Copy link
Owner

Appears answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants