Jump to content

Recommended Posts

So i got this code that shows the players who are online in a game Tibia.

But i have a guy his nick name in game is for ( Zio ) and every time when someone else's shows up on this list http://www.tibia.com/community/?subtopic=worlds&world=Refugia with a name ( Mastersziob ) it shows in the code that ( Zio ) is online but he is not. It shows him online because in the name ( Mastersziob ) are his letters ( Zio ) ( Masters+zio+b ) i need to get ride of this problem anyone can help me?

Regards Domitbg :)

 

<html>
<title>Fearsome Angels</title>
<body>

<font color="#33CC33 ">
<center>
<div style="text-align: left;">
<?php
$ch = curl_init("http://www.tibia.com/community/?subtopic=guilds&page=view&GuildName=Fearsome+Angels");   
curl_setopt($ch, CURLOPT_HEADER, 0);   
curl_setopt($ch, CURLOPT_POST, 1);  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
 $output = curl_exec($ch);	  
curl_close($ch);
//echo '<pre>'.htmlspecialchars($output).'</pre><hr/>';
preg_match_all('/name=[^"]+">([^><]+)<\/A>/', $output, $matched);

$fp = fopen("http://www.tibia.com/community/?subtopic=worlds&world=Refugia","r");
while (feof($fp) != 1)
$text= $text.stripslashes(fgets($fp,10000)); str_replace("+", " ", $text);
?>
<div id="code">
<h3>
<?php
$text= $text.stripslashes(fgets($fp,10000));

foreach ($matched[1] as $value){
if (strpos($text, $value) > 1) {
$online .= $value. " <b><font color='green'></font></b> <br>";
}
}

echo  $online;

?>
</h3>
</div>
<?
fclose($fp);
?>
</div>
</center>
</font>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/271548-help-small-problem-with-online-checker/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.