Sign in to follow this  
Followers 0
karman

Help me to get some values

4 posts in this topic

#1 ·  Posted (edited)

Hello,

</tr>

</table><div class="div4">

<table align="center" cellspacing="0" cellpadding="0"><tr class="f10" valign="top">

<td><img src="img/un/r/1.gif" width="18" height="12" border="0" title="Trä"></td>

<td id=l1 title=75>800/800</td>

<td class="s7"> <img src="img/un/r/2.gif" width="18" height="12" title="Lera"></td>

<td id=l2 title=75>800/800</td>

<td class="s7"> <img src="img/un/r/3.gif" width="18" height="12" title="Järn"></td>

<td id=l3 title=64>800/800</td><td class="s7"> <img src="img/un/r/4.gif" width="18" height="12" title="Vete"></td>

<td id=l4 title=41>800/800</td>

<td class="s7"> &nbsp;<img src="img/un/r/5.gif" width="18" height="12" alt="Veteåtgång">&nbsp;27/68</td></tr></table>

</div><div class="div3">Beräknat till <b>9</b> ms<br>Servertid: <b><span id=tp1>16:40:52</span></b> </div>

<div id="ce"></div></body>

</html>

How would i as easy as possible get the bolded values from this piece of text? please try and help me :)

Edited by karman

Share this post


Link to post
Share on other sites



Ummm..

Maybe this:

;get first one
$1 = _StringBetween($s, "<td id=l1 title=75>", "</td>")
;get second one
$2 = _StringBetween($s, "<td id=l2 title=75>", "</td>")
;get third one
$3 = _StringBetween($s, "<td id=l3 title=64>", "</td>")
;get fourth one
$4 = _StringBetween($s, "<td id=l4 title=41>", "</td>")
;get fifth one
$5 = _StringBetween($s, ">&nbsp;", "</td>")

Those will probably work, unless there are the same lines of code somewhere else in the HTML.


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

Cool, it worked.. Except the fifth one.. I fixed it myself however. Thank's alot Mr. Sandman!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You're welcome :)

Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0