0
Good evening. I have a table that I pick up via Curl. It updates every 30 seconds, and displays in an html. This table has the status of a character in a game (live or dead).
I wanted to know how to generate an Alert of each row of the table that was modified (went from live to dead, 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 shows me a table. 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 ALIVE. I’m lost in that part.
Post your code and what problem you’re having, that members of the community will help you and answer your problem more easily and quickly,
– Victor
https://pt.meta.stackoverflow.com/questions/5483/manual-de-como-n%C3%83o-fazer-perguntas/5484#5484
– user60252
Sorry, I was on my cell phone last night. Code posted!
– Guilherme Lirio