0

hi to all

i wana get the Traffic left from rapidshare account
i used this work but it doesnt work anyone cans help me?

ereg("<td>Traffic left:</td><td align=right><b><script>document\.write\(setzeTT\(\"\"\+Math\.ceil\((\d+)/1000\)\)\);</script> MB</b></td>", $pagedata, $traffic);

html code of this part is :

<td>Traffic left:</td><td align=right><b><script>document.write(setzeTT(""+Math.ceil(-123313/1000)));</script> MB</b></td>

i need this number : -123313 in html

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by digital-ether
0

Can you post your whole script please.

You would need to use curl to login to Rapidshare then take the data.

0

hi to all

i wana get the Traffic left from rapidshare account
i used this work but it doesnt work anyone cans help me?

ereg("<td>Traffic left:</td><td align=right><b><script>document\.write\(setzeTT\(\"\"\+Math\.ceil\((\d+)/1000\)\)\);</script> MB</b></td>", $pagedata, $traffic);

html code of this part is :

<td>Traffic left:</td><td align=right><b><script>document.write(setzeTT(""+Math.ceil(-123313/1000)));</script> MB</b></td>

i need this number : -123313 in html

In the regular expression, add -? before the number match. (\d+)

The ? means to match 0 or 1 occurrence. So it will match the negative character or skip it if the number is positive.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.