<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JackC</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JackC"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/JackC"/>
	<updated>2026-04-04T18:54:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PHP_SDK&amp;diff=9057</id>
		<title>PHP SDK</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PHP_SDK&amp;diff=9057"/>
		<updated>2007-07-11T15:37:36Z</updated>

		<summary type="html">&lt;p&gt;JackC: /* callFunction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
You can access the MTA Web Interface from almost any programming language that can request web pages using HTTP POST and encode and decode [[JSON]].&lt;br /&gt;
&lt;br /&gt;
PHP can do this very easily! This SDK provides one function &amp;quot;callFunction&amp;quot; that will allow you to call any exported script functions on any server that you have access to.&lt;br /&gt;
&lt;br /&gt;
The download below includes two example pages - one that shows a simple scoreboard, the other that shows the automatic handling of element and resource objects.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
===callFunction===&lt;br /&gt;
'''Syntax:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;[php]&lt;br /&gt;
$mtaSDK = new mta();&lt;br /&gt;
$returns[] = $mtaSDK-&amp;gt;callFunction( $hostname, $port, &amp;quot;resourceName&amp;quot;, &amp;quot;functionName&amp;quot; [,args...] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;[php]&lt;br /&gt;
include( &amp;quot;mta_sdk.php&amp;quot; );&lt;br /&gt;
$mtaSDK = new mta();&lt;br /&gt;
$retn = $mtaSDK-&amp;gt;callFunction( &amp;quot;bastage.student.utwente.nl&amp;quot;, 33004, &amp;quot;echobot&amp;quot;, &amp;quot;getThisResource&amp;quot; ); // $retn is an array containing the values the function returned&lt;br /&gt;
$resource = $retn[0]; // the first returned value is the resource&lt;br /&gt;
$retn = $mtaSDK-&amp;gt;callFunction( &amp;quot;bastage.student.utwente.nl&amp;quot;, 33004, &amp;quot;echobot&amp;quot;, &amp;quot;getResourceName&amp;quot;, $resource ); &lt;br /&gt;
$resourceName = $retn[0]; // contains the name of the resource 'echobot'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authentication==&lt;br /&gt;
If the server you are accessing requires authentication, you must pass the ''http_username'' and ''http_password'' variables to your instantiated instance of the mta() class.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;[php]&lt;br /&gt;
include( &amp;quot;mta_sdk.php&amp;quot; );&lt;br /&gt;
$mtaSDK = new mta();&lt;br /&gt;
$mtaSDK-&amp;gt;http_username = &amp;quot;myUsername&amp;quot;;&lt;br /&gt;
$mtaSDK-&amp;gt;http_password = &amp;quot;myPassword&amp;quot;;&lt;br /&gt;
$mtaSDK-&amp;gt;callFunction( &amp;quot;myServer&amp;quot;, 33004, &amp;quot;someResource&amp;quot;, &amp;quot;someFunction&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Caveats==&lt;br /&gt;
* This only works with PHP 5.0 and above.&lt;br /&gt;
* You cannot currently compare two Resource or Element instances that you expect to be identical - you need to do a &amp;quot;deep compare&amp;quot;, comparing either the &amp;quot;id&amp;quot; fields or the &amp;quot;name&amp;quot; fields.&lt;br /&gt;
&lt;br /&gt;
==Download==&lt;br /&gt;
*[http://misc.opencoding.net/mta/mtaphpsdk_0.2.zip Download Version 0.2] - Adds authentication support&lt;br /&gt;
*[http://misc.opencoding.net/mta/mtaphpsdk_0.1.zip Download Version 0.1] - ''Deprecated - Syntax differs from examples shown above.''&lt;/div&gt;</summary>
		<author><name>JackC</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PHP_SDK&amp;diff=9053</id>
		<title>PHP SDK</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PHP_SDK&amp;diff=9053"/>
		<updated>2007-07-11T00:09:32Z</updated>

		<summary type="html">&lt;p&gt;JackC: Updated details for version 0.2 of the SDK and add information on authentication&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
You can access the MTA Web Interface from almost any programming language that can request web pages using HTTP POST and encode and decode [[JSON]].&lt;br /&gt;
&lt;br /&gt;
PHP can do this very easily! This SDK provides one function &amp;quot;callFunction&amp;quot; that will allow you to call any exported script functions on any server that you have access to.&lt;br /&gt;
&lt;br /&gt;
The download below includes two example pages - one that shows a simple scoreboard, the other that shows the automatic handling of element and resource objects.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
===callFunction===&lt;br /&gt;
'''Syntax:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;[php]&lt;br /&gt;
$mtaSDK = new mta();&lt;br /&gt;
$returns[] = $mtaSDK-&amp;gt;callFunction( $hostname, $port, &amp;quot;resourceName&amp;quot;, &amp;quot;functionName&amp;quot; [,args...]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;[php]&lt;br /&gt;
include( &amp;quot;mta_sdk.php&amp;quot; );&lt;br /&gt;
$mtaSDK = new mta();&lt;br /&gt;
$retn = $mtaSDK-&amp;gt;callFunction( &amp;quot;bastage.student.utwente.nl&amp;quot;, 33004, &amp;quot;echobot&amp;quot;, &amp;quot;getThisResource&amp;quot; ); // $retn is an array containing the values the function returned&lt;br /&gt;
$resource = $retn[0]; // the first returned value is the resource&lt;br /&gt;
$retn = $mtaSDK-&amp;gt;callFunction( &amp;quot;bastage.student.utwente.nl&amp;quot;, 33004, &amp;quot;echobot&amp;quot;, &amp;quot;getResourceName&amp;quot;, $resource ); &lt;br /&gt;
$resourceName = $retn[0]; // contains the name of the resource 'echobot'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Authentication==&lt;br /&gt;
If the server you are accessing requires authentication, you must pass the ''http_username'' and ''http_password'' variables to your instantiated instance of the mta() class.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;[php]&lt;br /&gt;
include( &amp;quot;mta_sdk.php&amp;quot; );&lt;br /&gt;
$mtaSDK = new mta();&lt;br /&gt;
$mtaSDK-&amp;gt;http_username = &amp;quot;myUsername&amp;quot;;&lt;br /&gt;
$mtaSDK-&amp;gt;http_password = &amp;quot;myPassword&amp;quot;;&lt;br /&gt;
$mtaSDK-&amp;gt;callFunction( &amp;quot;myServer&amp;quot;, 33004, &amp;quot;someResource&amp;quot;, &amp;quot;someFunction&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Caveats==&lt;br /&gt;
* This only works with PHP 5.0 and above.&lt;br /&gt;
* You cannot currently compare two Resource or Element instances that you expect to be identical - you need to do a &amp;quot;deep compare&amp;quot;, comparing either the &amp;quot;id&amp;quot; fields or the &amp;quot;name&amp;quot; fields.&lt;br /&gt;
&lt;br /&gt;
==Download==&lt;br /&gt;
*[http://misc.opencoding.net/mta/mtaphpsdk_0.2.zip Download Version 0.2] - Adds authentication support&lt;br /&gt;
*[http://misc.opencoding.net/mta/mtaphpsdk_0.1.zip Download Version 0.1] - ''Deprecated - Syntax differs from examples shown above.''&lt;/div&gt;</summary>
		<author><name>JackC</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:MTA_Core_Specification&amp;diff=7255</id>
		<title>Talk:MTA Core Specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:MTA_Core_Specification&amp;diff=7255"/>
		<updated>2007-02-02T18:23:06Z</updated>

		<summary type="html">&lt;p&gt;JackC: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h3&amp;gt;2) Database Schema&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;2a) core_registered_servers&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;owners&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;text&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Comma delimited list of the userid's who own the server&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Isn't is better/faster to store these in a separate, indexed table? Comma separated stuff in a database looks a bit dodgy [[User:Harry|Harry]] 07:32, 17 January 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
No [[User:JackC|JackC]]&lt;/div&gt;</summary>
		<author><name>JackC</name></author>
	</entry>
</feed>