Community discussions

MikroTik App

Search found 4 matches

byITU
Fri Jun 17, 2011 9:57 am
Forum:Scripting
Topic:API PHP class
Replies:47
Views:71519

Re: API PHP class

As for the problem above, it appears there is a leading "/" missing:

Hope this helps.
Yes it does. Works now. Thank You! I must be more carefull checking my scripts syntax.
byITU
Thu Jun 16, 2011 5:35 pm
Forum:Scripting
Topic:API PHP class
Replies:47
Views:71519

Re: API PHP class

change to: $API->write('=.proplist=.id',false); I've done that, but the result is still the same. I've got : [17] system/script/run <<< [7] =.id=*1 >>> [5/5 bytes read. >>> [5, 40] !trap >>> [31/31 bytes read. >>> [31, 8] =message=no such command prefix >>> Any ideas why? The code looks like that r...
byITU
Wed Jun 15, 2011 6:03 pm
Forum:Scripting
Topic:API PHP class
Replies:47
Views:71519

Re: API PHP class

Hi I'm trying to run a script via MT API but without success :( My PHP code is : $API->write('/system/script/print',false); $API->write('.proplist=.id',false); $API->write('?name=bak'); $A = $API->read(); $A = $A[0]; $API->write('system/script/run', false); $API->write('=.id='.$A['.id']); $A = $API-...
byITU
Wed Jun 15, 2011 5:52 pm
Forum:Scripting
Topic:API PHP class
Replies:47
Views:71519

Re: API PHP class

Hi my question is when I'm trying to do export, the result is that the export file is incomplete. PHP code is : $API->write('/export', false); $API->write('=file='.$MT_NAME); $A = $API->read(); $A = $A[0]; there is no PPP and Wireless part in the file, but if I do that from MT's terminal by /export ...