Community discussions

MikroTik App
 
Jefte
just joined
Topic Author
Posts: 12
Joined: Wed Apr 06, 2016 2:23 pm

API - PHP

Wed Sep 27, 2017 8:41 pm

I have this command line -> /queue simple print where name~"pppoe" working fine.

But my problem is with API , trying ...

$API->write('/queue/simple/print',false);
$API->write('=where=',false);
$API->write("name~'pppoe'");

ignoring my regex '~pppoe' returning all 'queues'.

somebody have same "scenario/case" or someone suggestion?
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: API - PHP

Thu Sep 28, 2017 1:25 pm

Regular expressions are not supported by the API protocol yet.

Currently, the only way to do this sort of thing is on the PHP side, i.e. get all items, and check the properties with preg_match().
 
Jefte
just joined
Topic Author
Posts: 12
Joined: Wed Apr 06, 2016 2:23 pm

Re: API - PHP  [SOLVED]

Thu Sep 28, 2017 3:17 pm

I'll research about , thanks

Who is online

Users browsing this forum: InfraErik and 40 guests