Skip to content

Instantly share code, notes, and snippets.

@i-am-scott
Created April 10, 2014 14:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save i-am-scott/10386462 to your computer and use it in GitHub Desktop.
Save i-am-scott/10386462 to your computer and use it in GitHub Desktop.
Gmod lua_error_url
<?php
/*
Gmod Command (Including quotes!):
lua_error_url "http://example.com/log_errors.php"
Expected POST data
Array
(
[v] => 4
[hash] => 298231401
[error] => lua/entities/wac_pod_mm1_gau12/shared.lua:6: attempt to index global 'wac' (a nil value)
[stack] => 1. unknown - lua/entities/wac_pod_mm1_gau12/shared.lua:6
2. include - [C]:-1
3. unknown - lua/entities/wac_pod_mm1_gau12/init.lua:2
[realm] => server
[addon] => 221255637
[gamemode] => terrortown
[gmv] => 166
[os] => windows
[ds] => false
[time] => 20:04:12
)
*/
error_reporting( E_ALL ^ E_WARNING );
if( !empty($_POST) ){
file_put_contents( "log.txt", print_r( $_POST, true ) );
}
print_r( file_get_contents( "log.txt" ) );
?>
@Donkie
Copy link

Donkie commented Apr 20, 2014

Thanks for this :)

@swampservers
Copy link

Thanks for this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment