I'm trying to use the MTA PHP API to establish a connection to get data from the MTA server.
When call() (or callfunction()) is used, it throws HTTP error 401 (Access denied), and on the MTA server console, it says
HTTP: 'mta' entered correct password from [iP]
$mtaQ = new mta('128.204.203.182', 22005, 'mta', [correct password here]);
$resource = $mtaQ->getResource('CheckQuery'); // Exists and is running on the MTA server.
$mtaInfo_str[] = $resource->call('getPlayerInfo'); // Is an exported server-side function within CheckQuery
The script is on the same IP (and VPS) with the server and I've been trying a bunch of other ways to do it (using $mtaInfo_str as non-array, calling with callfunction() instead of call, leaving login info out, etc.), but it seems I've run into a dead end. Any help?