1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Access daily bandwidth without javascript

Discussion in 'Tomato Firmware' started by zowat, Mar 7, 2008.

  1. zowat

    zowat LI Guru Member

    Hi,

    I have a Linksys WRT54GL router and i've just upgraded it with the Tomato 1.17 firmware. I used to run DD-WRT with the WRTbwlog "addon".

    I have developed a small win-app that updates every 30 seconds and showes the daily bandwidth usage. With DD-WRT+WRTbwlog this was no problem, and all I had to do was to connect to the router and via http get a specific url and then parse the html for the value I was looking for.

    But now my problem is that the same approach dosen't seem to work with Tomato since it uses javascript to get the data in the bwm-daily.asp file and the javascript is of course not executed when i just fetch the html.

    Does anyone know of a way I can solve this? I just need to get the current day's total bandwidth.

    Best regards
    /Jesper
     
  2. bigclaw

    bigclaw Network Guru Member

    Could you not examine the Javascript code and see where it's getting its data from? It has to obtain it from the server via HTTP most likely anyway.
     
  3. zowat

    zowat LI Guru Member

    Thanks bigclaw. You are of course right.
    Just needed a good nights sleep.

    The javascript has an array, daily_history, that on my computer has the value
    PHP:
    daily_history = [
    [
    0x6c0207,0x3333c6,0x32d44]];
    This is because i only have data for one day so far.

    The first value is the date.
    Second one is amount downloaded
    And last one is amount uploaded.

    Br
    /Jesper
     

Share This Page