roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
Andyirado Xdxdthis
ClassicStyller - Whoisonline
Tibia is a free massively multiplayer online role-playing game (MMORPG)classicstyller.sytes.net
What's the website?
thisroriscrave Give me the list and i will help you, I would do it useing Excel or Libre, because as soon as you paste it it will paste them in different cells for you![]()
Andyirado Xdxdthis
ClassicStyller - Whoisonline
Tibia is a free massively multiplayer online role-playing game (MMORPG)classicstyller.sytes.net
<form action="#" method="post">
<p>Enter the online list url (e.g: http://website.com/?subtopic=whoisonline)</p>
Website Url: <input type="text" name="url"><br>
<input type="submit">
</form>
<?php
if(!empty($_POST['url'])){
$searchfor = 'subtopic=characters&name=';
$filename = $_POST['url'];
$file = file_get_contents($filename);
$doc = new DOMDocument();
@$doc->loadHTML($file);
$divs = $doc->getElementsByTagName('div');
foreach($divs as $div) {
if ($div->getAttribute('class') === 'BoxContent') {
foreach($div->getElementsByTagName('a') as $a) {
$property=$a->getAttribute('href');
if (strpos($property , $searchfor)){
$remove_url = str_replace('?subtopic=characters&name=', '', $property);
$remove_plus = str_replace('+', ' ', $remove_url);
echo $remove_plus .'<br>';
}
}
}
}
}
?>
sensationalPHP:<form action="#" method="post"> <p>Enter the online list url (e.g: http://website.com/?subtopic=whoisonline)</p> Website Url: <input type="text" name="url"><br> <input type="submit"> </form> <?php if(!empty($_POST['url'])){ $searchfor = 'subtopic=characters&name='; $filename = $_POST['url']; $file = file_get_contents($filename); $doc = new DOMDocument(); @$doc->loadHTML($file); $divs = $doc->getElementsByTagName('div'); foreach($divs as $div) { if ($div->getAttribute('class') === 'BoxContent') { foreach($div->getElementsByTagName('a') as $a) { $property=$a->getAttribute('href'); if (strpos($property , $searchfor)){ $remove_url = str_replace('?subtopic=characters&name=', '', $property); $remove_plus = str_replace('+', ' ', $remove_url); echo $remove_plus .'<br>'; } } } } } ?>
Here's a website code where you just have to enter the url for example ClassicStyller - Whoisonline (http://classicstyller.sytes.net/?subtopic=whoisonline) and it will show you all names.
Updated the code so it only fetch the BoxContent div class as I noticed there is Top Experience which was fetched aswell. Now it only shows the true list of players online.