<?php //Get list of updates $text = file_get_contents('https://404rq.com/update-list/mtasa.txt'); //Return updates list include "php-sdk/mta_sdk.php"; mta::doReturn($text);
if (isset($r['_c'])) { $res[] = ary2xml($r['_c'], $d + 1); } elseif (isset($r['_v'])) { $res[] = $r['_v']; } $res[] = (isset($r['_c']) ? $sp : '') . "</{$tag}>\n"; } } return implode('', $res); } // Insert element into array function ins2ary(&$ary, $element, $pos) { $ar1 = array_slice($ary, 0, $pos); $ar1[] = $element; $ary = array_merge($ar1, array_slice($ary, $pos)); } $html = file_get_contents("http://san.mta.vg/blog/feed/"); $rss = xml2ary($html); $items = $rss["rss"]["_c"]["channel"]["_c"]["item"]; $array = array(); foreach ($items as $article) { $item["title"] = utf8_decode($article["_c"]["title"]["_v"]); $item["url"] = $article["_c"]["link"]["_v"]; $item["autor"] = $article["_c"]["dc:creator"]["_v"]; $item["date"] = date("F j, Y", strtotime($article["_c"]["pubDate"]["_v"])); $array[] = $item; } //print_r($array); mta::doReturn($array);
<?php /* Project: SourceMode Version: 1.0 Last Edited: 26/10/2014 (Jack) Authors: Jack */ include "mta_sdk.php"; //Make sure you put this in the same directory of your recovery.php file. $input = mta::getInput(); //Get the input from the server $username = $input[0]; $email = $input[1]; $newPass = $input[2]; if ($username && $email && $newPass) { mail($email, "SourceMode: Password Recovery", "Dear " + $username + ",\nAccording to our system, you have requested a password recovery. Below you'll find your new login details.\n\nUsername: "******"\nPassword: "******"\n\nPlease change your password information when you log in to prevent anyone guessing the new pass and gaining access.\nSourceMode."); mta::doReturn(true); //Return true to the script to display "Sent" on the GUI return true; } else { mta::doReturn(false); //ERROR! return false; }
<?php require_once "mta_sdk.php"; require_once "mysql_init.php"; $input = mta::getInput(); $playerCount = $input[0]; mysqli_query($handler, "UPDATE `your_stat_table` SET `value` = '" . $playerCount . "' WHERE `key` = '1'"); mta::doReturn(true);