Jump to content

Pyr3x

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Pyr3x's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. wow, thanks a lot man! I was looking all over google for this! I used: echo htmlentities ("$outputline\n"); It worked great!
  2. I have a small script that prints the contents of a log on my server but it's removing tags from the output. An example would be: <username> data here is being printed as: data here removing: <username> I do not want it to strip these out of the output. How do I avoid this? <? $cmd = "tail -5 /opt/mserver/server.log"; exec("$cmd 2>&1", $output); foreach($output as $outputline) { print ("$outputline\n"); } ?>
  3. That is awesome! Thank you sir! One last question if that is OK. How would I grab clean data from the field: Array ( [server_info] => Array ( [up] => 1 [up_since] => Sun, 23 Oct 2011 04:04:01 -0600 [up_for] => 2588 [version] => Beta 1.9 Prerelease 4 ) } Example: [up_for] Also how do I convert that value to hours:min:seconds
  4. I have an array here that looks like this: Array ( [server_info] => Array ( [up] => 1 [up_since] => Sun, 23 Oct 2011 04:04:01 -0600 [up_for] => 2588 [version] => Beta 1.9 Prerelease 4 ) [players] => Array ( [0] => Pyr3x ) [server_settings] => Array ( [map] => Underworld [pvp] => 1 [pve] => 1 [max] => 50 ) [admins] => [ops] => Array ( ) ) How would I for example print the contents of the players array without having to be specific on which object within it that I wish to print, it's dynamic so it's always going to change. Example of the output I'd like is: Players: Pyr3x, SomeGuy, AnotherGuy Thank you for any help you may be able to provide. -Pyr3x
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.