Good evening. I have a table that I get via cURL. It refreshes every 30 seconds, and displays in an html. This table has the status of a character in a game (dead or alive).
I wanted to know how to generate an alert for each row of the table that was changed (moved from dead to alive, and vice versa).
cURL:
<?
$ch = curl_init("http://l2metal.com/?page=boss");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($ch);
preg_match('#<table[^>]*>(.+?)</table>#is', $page, $matches);
foreach ($matches as &$match) {
$match = $match;
}
echo '<table>';
echo $matches[1];
echo '</table>';
?>
JQuery:
$.get('http://meusite.com.br/boss.php', function(data){
$("#boss").html(data);
})
This displays a table for me. So far it's OK, but I wanted a light of what I can do to display an alert when some monster changes from DEAD to LIVE. I'm lost in that part.