I'm stuck with creating a TCL script. I have a webpage that I get with http::geturl etc. the output of that file is in $data
let's say the content of $data is:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<body>
<div id="maindiv" >
<div id="ServerCheckDiv">
<table id="ServerCheckTable">
<tr><th>Server</th><th>Status</th><tr>
<tr><td>Account</td><td><img SRC="dot_green.gif"/>Online</td></tr>
<tr><td>Character</td><td><img SRC="dot_green.gif"/>Online</td></tr>
<tr><td>Interact</td><td><img SRC="dot_green.gif"/>Online</td></tr>
<tr><td>Zone</td><td><img SRC="dot_green.gif"/>Online</td></tr>
<tr><td>Proxy</td><td><img SRC="dot_green.gif"/>Online</td></tr>
</table>
</div>
</div>
</body>
</html>
Now I want to make a script that will retrieve every server status and post it on the chan (the account server status goes to $account, character status goes to $character, etc.)
So I want to parse the file and select only row nrs. 8 till 13.
Then it has to search in those rows of it says ONLINE or OFFLINE
And than put that in the right variable (account status in $account, etc)
Could someone help me? I'm really stuck...been trying to make this for over a month now
thx.
Chris