I am creating a website using PHP where it shows top lithuanian minecraft servers and their player count. Unfortunately, I've run into a problem whereas one of the servers gives me the wrong player amount. My solution to that was to use their "official" site and get the part of the website where it says how many people are currently online, this is the code that I have now for that:
$content = file_get_contents($url);
$first_step = explode( '<font size="4" face="tahoma">' , $content );
$second_step = explode("</font>" , $first_step[1] );
And I got an error saying:
Notice: Undefined offset: 1 in C:\wamp64\www\index.php on line 212
Can't figure it out on my own, so I thought maybe you can help.