Hey Guys recently ive been working on my own gamepanel for my servers but im having some trouble actually making the web console part which i relly want
i have tryed multiple ways to display the console.log but nothing seems to work anyone know a way to display the console.log in php without any trouble like it all appearing in 1 line or its all clumped together
console.log is a javascript function.
[QUOTE=brianosaur;50546475]console.log is a javascript function.[/QUOTE]
I Have no idea what you mean by that
Go. Learn. PHP.
[QUOTE=relinquish;50548590]Go. Learn. PHP.[/QUOTE]
I. Am. Trying. To
The reason why im making a gamepanel (trying) is there isent relly any gamepanels for a low amount of servers (2+-)
[QUOTE=brianosaur;50546475]console.log is a javascript function.[/QUOTE]
Ah well I Meant how do you read the file created by a garrysmod file console.log
as fread and fopen just doesent clumb all the words together
Your problem now makes a bit more sense. You're trying to read from a file but it isn't being formatted correctly. I assume the Garry's mod logs at least contains new lines in it. So is fread not reading /r and /n's?
Have you tried file_get_contents? [url]http://php.net/manual/en/function.file-get-contents.php[/url]
[QUOTE=brianosaur;50550159]Your problem now makes a bit more sense. You're trying to read from a file but it isn't being formatted correctly. I assume the Garry's mod logs at least contains new lines in it. So is fread not reading /r and /n's?
Have you tried file_get_contents? [url]http://php.net/manual/en/function.file-get-contents.php[/url][/QUOTE]
I Solved it by using passthru('tail -20 console.log')
[editline]19th June 2016[/editline]
Back to the drawing board imma try to figure out how to send rcon commands to the server with php :D
[QUOTE=Zortex;50550322]I Solved it by using passthru('tail -20 console.log')
[editline]19th June 2016[/editline]
Back to the drawing board imma try to figure out how to send rcon commands to the server with php :D[/QUOTE]
[URL="https://fremnet.net/article/199/source-rcon-class"]This class works well.[/URL]
[QUOTE=nulls;50550515][URL="https://fremnet.net/article/199/source-rcon-class"]This class works well.[/URL][/QUOTE]
I Have No idea how to use Premade Classes as ive never used one made my other ppl Did he include a tutorial or something?
Classes that others have made are easy to implement. Just put into a PHP file then include that PHP file, or if you're using a single PHP file for everything just put it in there.
Honestly, before starting on a gamepanel of sorts you should probably make something simpler that will further your PHP knowledge.
[QUOTE=wishbone;50557168]Classes that others have made are easy to implement. Just put into a PHP file then include that PHP file, or if you're using a single PHP file for everything just put it in there.
Honestly, before starting on a gamepanel of sorts you should probably make something simpler that will further your PHP knowledge.[/QUOTE]
Currently ive probberly made all of the gamepanel except ftp file browser and rcon
As Ive never tryed anything near to rcon before / ive never used premade classes before
Thats the hardest
[QUOTE=wishbone;50557168]Classes that others have made are easy to implement. Just put into a PHP file then include that PHP file, or if you're using a single PHP file for everything just put it in there.
Honestly, before starting on a gamepanel of sorts you should probably make something simpler that will further your PHP knowledge.[/QUOTE]
I learned a lot of my C++ and the likes from taking on giant projects, it forced me to learn the hard stuff instead of just looking at examples.
I'd say it's up to how you learn.
Sorry, you need to Log In to post a reply to this thread.