ping problem in mikrotik php api

Hello guys..i’m new to Mikrotik programming…i’m using routeros PHP API to ping pppoe user from Mikrotik login..
here is my code

require(‘routeros_api.class.php’);
$API = new routeros_api();

if ($API->connect($mikrotik_ip, $user, $pwd))
{
$API->write(‘/ping’,false);
$API->write(“=address=$pppoe_user_ip”,false);
$API->write(‘=count=3’,false);
$API->write(‘=interval=1’,false);
$API->write(‘=src-address=$mikrotik_ip’);

$ARRAY= $API->read();
print_r($ARRAY);
$API->disconnect();

}

but i’m getting internal server error on browser..
please help me out! :frowning: :frowning: :unamused:

it is good practice to test these commands out on known good client like python api implementation, so you know, that your command is working and returning meaningful result.

An internal server error could be caused by quite a few things other than the API.

It’s most frequently caused by syntax errors.

How does the rest of your PHP file look like?