Basic Garrysmod Loading screen. HTML for PHP.

I will be making a tutorial on how to hook your server up to steam workshop, and adding files to resrouce.lua (for noobs)

Best place for tutorials is the wiki:


@1-Bit, There already are on the wiki, feel free to improve them.

There is old loading url - it’s a nice example to start.

This was a simple broken down tutorial for those who don’t know how to program. This is a step by step tutorial because all the wiki’s are layered down for people who are experienced.

Nobody is preventing you from putting step-by-step tutorials on the wiki, it is not for experienced people only.

Can you not read? The bottom of my post clearly states to NOT do what you just did.

The problem is that those tutorial threads on facepunch is that they will be buried under a ton of other threads, unlike the wiki.

Very true. But eventually when google bot hits this page, people will be able to search up this page by entering any part of the title. i hope alot of people are able to use this for help!

One more problem of newbies: They hardly ever search, and when they do, they can’t find much because they don’t know how to use Google Search to its full potential.

Lol. Noooobbs. Im just trying to help. I like helping ^.^

If you want to help then post it on the wiki. I mean posting it in two places isn’t going to harm anyone and will allow you to help more people.

That code looks very familiar…

Well its a loading screen… in javascript. its been done before… its the standard for a loading screen

Sure, it’s fine that you created a thread so people can google the question and see it, but why not put it on the wiki for backup?

How to get avatar and nickname of connecting player? /Solved

Im glad you figured it out. I guess i forgot to mention the GameDetails function. XD

it’s just the worst when someone asks for a public solution to a question, figures it out, and doesn’t post it

i’ve ran into countless troubles searching for programming help in the past via google, where posts like these create a promising search result that yields nothing

This is my code which grabs both the Avatar and steam username from the XML file.

  function get_steam_status($steamID64, $timeout = 5) {
    $context = stream_context_create(array('http' => array('timeout' => $timeout)));
    $file = @file_get_contents('' . $steamID64 . '/?xml=1', false, $context);
    $xml = simplexml_load_string($file);
    if (isset($xml->steamID)) {
      $online_state = (string)$xml->steamID;
          $state_message = $online_state;
          //echo $state_message;
    } else {
      $state_message = 'UNABLE TO DETECT USERNAME. XML FAILURE.';

        if (isset($xml->avatarMedium)) {
        $avatar_state = (string)$xml->avatarFull;
        $avatar_message = "<img src=$avatar_state ></img>";
    return $avatar_message . "<br>" . $state_message;

I will add this to original post and credit you.

Please. For the love of god. Don’t use XML anymore - Use the newer method with the SteamAPI. Like described by my friend wh1t3rabbit in this post:

**Please remember to use the way he has done here with

function get_data($url) { //get data from a url
	$ch = curl_init();

because if you do it any other way - You might stumble upon some PHP allow_url_fopen errors (like many CoderHire loadingURL’s) due to your Host disabling the feature.**