Jump to content

[PHP->Resource] HTTP Connection Rejected


3ventic

Recommended Posts

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?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...