gordliamjack Posted July 6, 2009 Share Posted July 6, 2009 does the mta server (http) support PHP?? i need to know for the script im making if not am i allowed to implement it Link to comment
0 robhol Posted July 6, 2009 Share Posted July 6, 2009 It doesn't, but there's no real need to, IMO, since you have Lua. Link to comment
0 gordliamjack Posted July 6, 2009 Author Share Posted July 6, 2009 It doesn't, but there's no real need to, IMO, since you have Lua. can i script this in lua ??? Server Uptime <?php header('Refresh: 1; url=../main.php');//do not make less than 1 will use too much server power //script by Gordon MacPherson 2009 please dont remove this i did spend ages on this script $pagefile = 'c:\pagefile.sys'; // Path to system pagefile. Default is c:\\pagefile.sys function ifif ($value, $true, $false) { if ($value == 0) { return $false; } else { return $true; } } $upsince = filemtime($pagefile); $gettime = (time() - filemtime($pagefile)); $days = floor($gettime / (24 * 3600)); $gettime = $gettime - ($days * (24 * 3600)); $hours = floor($gettime / (3600)); $gettime = $gettime - ($hours * (3600)); $minutes = floor($gettime / (60)); $gettime = $gettime - ($minutes * 60); $seconds = $gettime; $days = ifif($days != 1, $days . ' days', $hours . ' day'); $hours = ifif($hours != 1, $hours . ' hours', $hours . ' hour'); $minutes = ifif($minutes != 1, $minutes . ' minutes', $minutes . ' minute'); $seconds = ifif($seconds != 1, $seconds . ' seconds', $seconds . ' second'); echo 'Server uptime: ' . $days . ' ' . $hours . ' ' . $minutes . ' ' . $seconds; echo ' Up since: ' . date('l. F jS, Y. h:i a', $upsince); ?> Link to comment
0 eAi Posted July 11, 2009 Share Posted July 11, 2009 You could, yes. It's probably only about 5 lines of code. http://development.mtasa.com/index.php? ... rsed_files Link to comment
Question
gordliamjack
does the mta server (http) support PHP??
i need to know for the script im making
if not am i allowed to implement it
Link to comment
3 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now